Hi
I want to create a drop-down list providing links, but sth wrong with it. I can't link to other addresses. Could some one help me? Thanks a lot.
<form action="select.php" method="post"> Please choose a month <select name="select"> <option selected value=""> <option select name="select"> <option value="http://www.rx8ownersclub.co.uk/Meetings.htm#Feb04">February</option> <option value="http://www.rx8ownersclub.co.uk/Meetings.htm#Mar04">March</option> <option value="http://www.rx8ownersclub.co.uk/Meetings.htm#Apr04">April</option> <option value="http://www.rx8ownersclub.co.uk/Meetings.htm#May04">May</option> <option value="http://www.rx8ownersclub.co.uk/Meetings.htm#Jun04">June</option> <option value="http://www.rx8ownersclub.co.uk/Meetings.htm#Jul04">July</option> <option value="http://www.rx8ownersclub.co.uk/Meetings.htm#Aug04">August</option> <option value="http://www.rx8ownersclub.co.uk/Meetings.htm#Sep04">September</option> <option value="http://www.rx8ownersclub.co.uk/Meetings.htm#Oct04">October</option> <option value="http://www.rx8ownersclub.co.uk/Meetings.htm#Nov04">November</option> <select> <Input type="submit" name="submit" value="Go" onClick="if (form.select.selectedIndex != 0) location = form.select.options[form.select.selectedIndex].value; else alert('Please choose a month')">
</form>
Originally posted by dao1 <option value="http://www.rx8ownersclub.co.uk/Meetings.htm#Nov04">November</option> <select>
I didn't look at your code in great detail, but I did notice that you didn't close your <select> tag.
Use:
</select>
in the line where I quoted you.
Thank you. I am a beginner. I have corrected it, but it didn't work. Do I have other mistake?
Originally posted by dao1 <option selected value=""> <option select name="select">
You also need to close out these <option> tags: <option selected value=""></option> <option select name="select"></option>
I did it, but I still not able to link them. I suppose I still have other mistake.
The problem seems to exist in your JavaScript. Maybe someone else can help you with that.
Thank you anyway. I need the answer urgently.
I can link to addresses now.
I change
<Input type="submit" name="submit" value="Go"
into:
<Input type="button" name="button" value="Go"
but could any one tell me why the drop-down list has empty space? Thanks.
Sorry about my English.