Haramiz Posted May 19, 2006 Share Posted May 19, 2006 There's a way to make each <option> in the form link to a different html in the iframe?I'm really have troubles trying to do so...Here follows my code without the links. <HTML><BODY><form> <select name=State> <option value="A">A</option> <option value="B">B</option> <option value="C">C</option> </select></form><iframe src=form2.html width=300 height=100 frameborder=0 name=iframe></iframe></BODY></HTML> Can anyone help me? Link to comment Share on other sites More sharing options...
Haramiz Posted May 19, 2006 Author Share Posted May 19, 2006 Can any help me plz?I want to when the client change the option to "A", the iframe loads the "formA.html" and so on with the other options in the form above.Any idea? Link to comment Share on other sites More sharing options...
skym Posted May 19, 2006 Share Posted May 19, 2006 <HTML><BODY><form> <select name=State onChange="document.getElementById('myIframe').src=this.value"> <option value="form2.html">A</option> <option value="form3.html">B</option> <option value="form4.html">C</option> </select></form><iframe id="myIframe" src=form2.html width=300 height=100 frameborder=0 name=iframe></iframe></BODY></HTML> Link to comment Share on other sites More sharing options...
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now