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>

Recommended Answers

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" …
Jump to Post

All 2 Replies

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>

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

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts learning and sharing knowledge.