JS Help need , fill iframe form with JS
i want to add text to a text box inside of iframe. bellow my code but it's not working ??
can any one help?
<html > <head> <script type="text/javascript"> function myd() { document.getElementById('myform').document.forms('form1').text1.value = 'Hello world!'; } </script> <title>Untitled Document</title> </head> <body> <input type="submit" name="Submit" value="Submit" onclick="myd()" /> <iframe name="myform" src="text.php" width="100%" height="500"> </iframe> </body> </html>
iframe html
<html> <body> <form id="form1" name="form1" method="post" action=""> <input type="text" name="text1" /> </form> </body> </html>
The best way to predict future is to create it ― Abraham Lincoln
The best way to predict future is to create it ― Abraham Lincoln