orlandojobz
09-19-2008, 05:14 AM
I have this webpage that uses <input type='text' id='userInput'
and a Iframe, with the user input I want them to change the the 'URL' thats inside the iframe, the default Iframe link looks like this
<script type="text/javascript">
function changeIFRAMETONEWURL(){
<!--- the code here??
}
</script>
<input type='text' id='userInput' value="http://www.w3schools.com/TAGS/tag_iframe.asp"/>
<input type='button' onclick='changeIFRAMETONEWURL()' value='Change Url'/>
I tried at runtime this piece of code.
<input type='text' id='userInput' value="http://www.w3schools.com/TAGS/tag_iframe.asp"/>
the Iframe would not display the url located in <input type='text' id='userInput' 'Textbox'
<iframe
src ='userInput' <!---- this does not work -->
width="100%">
</iframe>
and I tried 'still nothing?
<iframe
src ="userInput.value" <!--- does not work also -->
width="100%">
</iframe>
using the javascript how can I change the iframe using the Userinput -URL they
enter.
Thank You Ben:)
and a Iframe, with the user input I want them to change the the 'URL' thats inside the iframe, the default Iframe link looks like this
<script type="text/javascript">
function changeIFRAMETONEWURL(){
<!--- the code here??
}
</script>
<input type='text' id='userInput' value="http://www.w3schools.com/TAGS/tag_iframe.asp"/>
<input type='button' onclick='changeIFRAMETONEWURL()' value='Change Url'/>
I tried at runtime this piece of code.
<input type='text' id='userInput' value="http://www.w3schools.com/TAGS/tag_iframe.asp"/>
the Iframe would not display the url located in <input type='text' id='userInput' 'Textbox'
<iframe
src ='userInput' <!---- this does not work -->
width="100%">
</iframe>
and I tried 'still nothing?
<iframe
src ="userInput.value" <!--- does not work also -->
width="100%">
</iframe>
using the javascript how can I change the iframe using the Userinput -URL they
enter.
Thank You Ben:)