Hey, I'm working on my first ever site for mobile phone users and I'm having problems getting my drop down menu to show up. I realised that I'm not even sure if they'll work on mobiles. I'm just trying to do a simple drop down menu like this: <form> <select> <option>Choose an item: <option value="./page1.htm">Option 1 <option value="./page2.htm">Option 2 </select> <input type="submit" value="Submit"> </form> Will these work at all? Is there another way to do them? I've been using the tester on http://dev.mobi and can't get the drop down to appear. Thanks! Kirsty
It should work - try closing your option tags: <form> <select> <option>Choose an item:</option> <option value="./page1.htm">Option 1</option> <option value="./page2.htm">Option 2</option> </select> <input type="submit" value="Submit"> </form>
Hrm... when I close the option tag the page doesn't display at all, it comes up with an error. Without them closed the page shows up but without the drop down menu. any other suggestions?
Here's my test site: http://www.travoholic.com/test.html and I'm trying to get it to work with the moblie tester on http://dev.mobi but it won't show the drop down. If someone could take a look at my site to see what else I can try I would really appreciate it!!
I justed tested it and it failed on 2 things; So you have to close the option tags, and you have to specify an action for the form in order for the drop down to work; something like: <form action="mypage.php" method="post">
Thanks for that. I didn't totally understand them all. For the "action" for the form... all I want to happen is for the form to go to the URL for whichever thing on the dropdown menu is chosen. What should I put in as the action? Thanks again!!
you need to write the php or javascript code for that. if you need the code pm me. i can write it for u
Yeah, you're going to need some PHP processing. Here's a free open source PHP script you can use to process any html input element on any form: Generic All Purpose PHP Contact Form Submitter
try this code, maybe it can help you/... <form name="Drop down"> <select style="font-size:12px;color:#006699;font-family:verdana;background-color:#ffffff;" name="menu"> <option value="http://test.com">test</option> <option value="http://me.com">me</option> <option value="http://testme.com">testme</option> </select> <input style="font-size:12px;color:#ffffff;font-family:verdana;background-color:#006699;" type="button" onClick="window.open(document.Drop down.menu.options[document.Drop down.menu.selectedIndex].value);" value="click here"> </form> Code (markup):