Jump to content

Form <option> issue


Haramiz

Recommended Posts

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

<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

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 account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...