I'm trying to take normal, plain Jane drop-down boxes to choose a time, and replace them with a nicer DHTML version.

I followed this tutorial http://www.javascriptkit.com/script/script2/dhtmlcombo.shtml but now my buttons are stacked on each other, the selected="selected" variable isn't pre-selecting anything, and if you click on a number (5), it takes you to .com/5. This isn't going to work, as I need all the inputs set, then the submit button to be pushed.

This is what it looks like:
[IMG]http://img573.imageshack.us/img573/7617/dhtmlsshot.jpg[/IMG]

Any ideas?

Code: http://pastebin.com/TN7HaWF5


Thank you!

-- fusarium

First thing to check the DOCTYPE. Make sure it's the same as the javascriptkit example page. With luck, that'll fix it.

Airshow

Mmmm, DOCTYPE and html both tag look right.

Closing script tag is a must though it appears that omiting it wasn't as serious as I would have expected.

XHTML TRANSITIONAL is pretty tollerant (much more so than STRICT) but even so, certain rules should be adhered to. Try checking your XHTML againt the advice in this tutorial, and/or run the page through a validator (Google XHTML validator for links).

After that, I'm out of concrete ideas except to suggest a strategy ...

... Try taking a copy of the javascriptkit example page (right-click, view source, select all, copy, then paste into your favourite editor ....) and gradually migrate your XHTML in and theirs out - see at which point it breaks.

Airshow