PDA

View Full Version : Redone the code



rbennitt
04-13-2007, 12:53 AM
I need to get the iframe to open when the test site is submitted. Please help me with this and thank you in advance for your time.

<html>
<head>
<title>Website Resolution Tester</title>
<script language="javascript">
function runURL () {
document.getElementById('newframe').src = document.myform.webadd.value
return false
}


</script>
</head>
<body>
<p>&nbsp;</p>
<form name="myform" method="post" action="tester2.html" onsubmit="return runUrl()">
Type the address of the site to test:
<input type="text" name="webadd">
<input type="submit" value="Click to Test">
</form>

<p>640x480</p>

<iframe id="newframe" src="" width="640" height="480" frameborder="no">
</iframe>
</body>
</html>

mburt
04-13-2007, 12:57 AM
<html>
<head>
<title>Website Resolution Tester</title>
<script language="javascript">
function runURL () {
document.frames['newframe'].src = document.myform.webadd.value
return false
}
</script>
</head>
<body>
<p>&nbsp;</p>
<form name="myform" method="post" action="tester2.html" onsubmit="return runUrl()">
Type the address of the site to test:
<input type="text" name="webadd">
<input type="submit" value="Click to Test">
</form>

<p>640x480</p>

<iframe name="newframe" src="" width="640" height="480" frameborder="no">
</iframe>
</body>
</html>

Untested, but should work.

rbennitt
04-13-2007, 01:04 AM
it did not and i am completely stumped on this one.

thetestingsite
04-13-2007, 01:09 AM
Your code works (this is to the original posted). Just change in the form onsubmit attribute:



onsubmit="return runURL();"


Case sensative helps, and for a test visit http://phphost.smackum.com/dd/other.html

Hope this helps.