0

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>
2
Contributors
2
Replies
4
Views
6 Years
Discussion Span
Last Post by Kniggles
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>

Edited by haleel: n/a

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 :)

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.