-
<SELECT> problem
using the select (drop down list), what code would i need to do to put the items :
Alaska,
UK,
and then when one of these is selected it should take the user to a webpage relating to that selection.
E.G. Alaska - www.alaska.com
UK - www.uk.com
Any help would be great.
Cheers
Nick
-
Well with JavaScript you can do it like this:
Code:
<select onchange="document.location.href = this.options[this.selectedIndex].value">
<option value="http://www.alaska.com/">Alaska</option>
<option value="http://www.uk.com/">UK</option>
</select>
But if you have PHP, Perl or any other server-side method I would really recommend using them as about 10%-15% of the Internet do not have Javascript turned on in their browsers. If you have one let us know and we can give you the appropriate code.
-
thankyou kindly.
That was the exact expert knowledge i was after.
Cheerz.