I've been working at this for a while now, but don't understand what's wrong with my code. I'm sure it's something simple - it always is!
Basically, I have a drop down menu, with some options. I want it to go to a web page when the third option, plumber, is selected. When any of the others are clicked, nothing should happen.
My code so far is:
<select id = 'search'>
<option value="1">Carpenter</option>
<option value="2">Electrician</option>
<option value="3">Plumber</option>
<option value="4">Tiler</option>
<option value="5">Boiler Installation</option>
</select>
Go
And my javascript is:
<script>
function go_button {
if (search.value=="3") {
location="search_results.htm"
}
}
</script>
But it's not working. Could someone tell me what's wrong?
Thanks.
C.