IFRAME display change.
Can anyone see why this dos not work please
<HTML><HEAD><script type="text/javascript">
function x()
{
<IFRAME( src="inputstringA" name = "bob1" ></IFRAME> );
}
</script><TITLE></TITLE><META name=GENERATOR content="MSHTML 8.00.7600.16722"></HEAD><BODY>
<INPUT value=www.website2.com name=inputstringA>
<INPUT onclick="x()" value=" Press Input A$" type="button" name="loadb"></TD>
<IFRAME src="www.website1.com" name = "bob1" ></IFRAME></TD><TD align="center" width="556" vAlign="top" height="23">
></BODY></HTML>
Kniggles
Junior Poster in Training
57 posts since Oct 2010
Reputation Points: 10
Solved Threads: 0
Please change your code like below. I hope it will solve your problem.
<HTML>
<HEAD>
<script type="text/javascript">
function x()
{
IFrameSource=document.getElementById("inputstringA").value;
document.all.bob1.src=IFrameSource;
}
</script>
</HEAD>
<BODY>
<INPUT type="text" value="http://www.yahoo.com" name="inputstringA" id="inputstringA">
<INPUT onclick="x()" value=" Press Input A$" type="button" name="loadb">
<IFRAME src="http://www.google.com" name = "bob1" id="bob1" ></IFRAME>
</BODY>
</HTML>
well done, thank you very much :)
Kniggles
Junior Poster in Training
57 posts since Oct 2010
Reputation Points: 10
Solved Threads: 0