View Full Version : Resolved Trying to work out how to populate a drop down list?
11-13-2010, 06:42 PM
I have a drop down list that I want to populate with items that are dependent on the selection of the first drop down list.
I can't figure out how to do this, has anyone on here done this before?
11-13-2010, 07:03 PM
If you already have a dropdown working it must have menu items already. Just replace them with your own.
Not much we can tell you without having a look at your code. I'm sure most people here have done a dropdown menu, they can be very difficult for a new coder.
Post your code here and let us have a look. Even better, link us to the test site.
11-13-2010, 07:15 PM
Heres the code, I only didn't show it as I haven't got very far, just can't figure out how to do it!
<select id=Items >
<option value=01 selected>Opt1</option>
11-13-2010, 07:42 PM
I beleive options like that are an element of forms. I mistook your question to be about a menu, like navigation for a website.
Are you following a tutorial to do this?
11-13-2010, 07:45 PM
No, I just teach myself and learn by mistakes. While I have done a lot of coding I am new to HTML. I am guessing that maybe I will have to run some kind of script to do this.
11-13-2010, 07:58 PM
That's a good way to learn, jsut dive in and do it. A good tutorial can help a lot too, google can probably help you with that.
One thing to note, your document should have a valid DocType. I don't know if it does and you just didn't quote it here with your code...
Have a look at the link about DocTypes in my signature line.
11-13-2010, 08:02 PM
11-14-2010, 10:05 AM
That is great, just what I was wanting to do.
Powered by vBulletin® Version 4.2.2 Copyright © 2015 vBulletin Solutions, Inc. All rights reserved.