0

Hi All,

How can we set a value to iframe textbox element either in JS/Jquery

<head>
        <script type="text/javascript">
            function load()
            {
            alert("Frame is loaded");
            myframe.document.getElementById("user_email").value = "<?php echo $var ?>";
            }
        </script>
    </head>
    <body>
        <iframe onload="load()" id="myframe" name="myframe" src="http://www.gigpayrr.com/signup" width="700px" height="600px">
          <p>Your browser does not support iframes.</p>
        </iframe>
    </body>
2
Contributors
2
Replies
15
Views
4 Years
Discussion Span
Last Post by deepak.fugo
1

I would probably just pass it as a query string parameter for the page in the iframe tag.

<iframe onload="load()" id="myframe" name="myframe" src="http://www.gigpayrr.com/signup?user_email=<?php echo $var ?>" width="700px" height="600px">

Then you could use $_GET['user_email'] on the page in the iframe to get the value.

This question has already been answered. Start a new discussion instead.
Have something to contribute to this discussion? Please be thoughtful, detailed and courteous, and be sure to adhere to our posting rules.