Forum Moderators: coopster

Message Too Old, No Replies

Making options in a form into links

         

internetheaven

1:50 pm on Mar 6, 2008 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



I have:

<select name='txtlocation' id='txtlocation' class='inputSelect'>
<option value='1'>England</option>
<option value='2'>Scotland</option>
<option value='3'>Wales</option>
<option value='4'>Northern Ireland</option>
<option value='5'>Ireland</option>
<option value='6'>Outside the UK</option></select>

as an input on a search form with other input boxes. If a user selects England, Wales, Northern Ireland or Outside UK I want the form to stay as it is and submit that information as it currently does. But, if Scotland or Ireland are selected I want the user to be transferred to a different page on the site.

Is it possible to do that with HTML/PHP?

Thanks
Mike

jatar_k

2:12 pm on Mar 6, 2008 (gmt 0)

WebmasterWorld Administrator 10+ Year Member



You could use javascript to check the value selected onChange

though if they whisk away as soon as they change the select it would be unfortunate if they picked the wrong one.

Did you want them to fill a different form?