Forum Moderators: open

Message Too Old, No Replies

Simple form menu

getting links to displany in Iframe

         

limbo

1:38 pm on Apr 1, 2004 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



The code:

<form name="jump">
<select name="menu" onChange="location=document.jump.menu.options[document.jump.menu.selectedIndex].value;" value="GO">
<option value="#" selected>Choose widget</option>
<option value="http:www.widgets.com/1">widget 1</option>
<option value="http:www.widgets.com/2">widget 2</option>
<option value="http:www.widgets.com/3">widget 3</option>
</select>
</form>

If I want to have the link selected from the menu load into an iframe what would I need to add?

I thought I could add target="iframe1" to the option tag? like:

<option value="http:www.widgets.com/3" target="iframe1">widget 3</option>

but that would be too simple ;)

Ta

Limbo

-----------

<added>
Does anyone have a good tutorial for the styling of forms with css? Ta.
</added>

limbo

3:28 pm on Apr 1, 2004 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



Got this from a helpful colleague

<select name="menu" onChange="iframe1.location=document.jump.menu.options[document.jump.menu.selectedIndex].value;" value="GO">

Works perfectly!

Must be the third time in as many weeks I have answered my own query.