PDA

View Full Version : iFrame Address Bar



techno_race
03-18-2007, 07:01 PM
I need to make an address bar for an iFrame.
I have one page with an iFrame in it.
I need a text form field on that page that has a 'Go' button.
Then, if someone types in 'dogs' and hits 'Go,' it will change:

<iframe id="iframe" height="95%" width="100%" frameborder="0" src="http://www.mydomain.com/mypages/mainpage.htm"></iframe>
to

<iframe id="iframe" height="95%" width="100%" frameborder="0" src="http://www.mydomain.com/mypages/dogs.htm"></iframe>

jscheuer1
03-18-2007, 07:17 PM
<iframe id="iframe" height="95%" width="100%" frameborder="0" src="http://www.mydomain.com/mypages/mainpage.htm"></iframe><br>
<input id="goput" type="text">
<input type="button" value="Go" onclick="document.getElementById('iframe').src='http://www.mydomain.com/mypages/'+document.getElementById('goput').value+'.htm';">