passing data to an IFrame

by 6 replies
8
Hello all,

Is it possible to pass data to an IFrame? If so, how can it be done?

TIA
#programming #data #iframe #passing
  • Your question is not clear. But this can help you. Posts containing 'pass data to iframe' - Stack Overflow
    • [ 1 ] Thanks
  • Passing data to an iFrame is generally prevented through browsers' cross site scripting protections. The only exception I know of is that you could pass GET variables to an iFrame by changing its src in the parent page.

    For instance, you could do something like this:

    <iframe src="http://www.example.com/somepage"></iframe>

    to

    <iframe src="http://www.example.com/somepage?name=Bob"></iframe>

    Passing JavaScript, POST or any other kind of data to an iFrame isn't going to work.
    • [ 1 ] Thanks
    • [1] reply
    • Thanks for the info. I guess such a page would have to be generated on the fly? Basically, I have another application that requires a login ID and password. When calling it from Wordpress, was hoping to be able to pass that in (instead of having the user see "LoginID/Password" boxes).
      • [1] reply
  • Hi,

    yes u send data to iframe using query string for example "http://www.examplelink.com/testpage.php?id=4

    it send data using GET method form .

    or use ajax method to load into iframe , u can send POST method data also .

Next Topics on Trending Feed