logo-dw

Go Back   Dreamweaver Club Forums > Hand Coders Forum > Javascript and JS frameworks
Register FAQ Members List Search Today's Posts Mark Forums Read

Reply
 
Thread Tools Display Modes
Old 11-04-2009, 02:09 PM   #1
urbanrays
 
Join Date: Dec 2008
Posts: 212
Default 3 sperate droplists from Java file

Could someone please help me, I have 6 seperate drop down lists on my page, they are in 3 seperate catorgories, and 3 of the dropdowns from each catergory contains a list of the counties

The first drop down list for the first county is being called from "list.js"
How do I do it so each dropdown box reads this one java, or is it a case of having "list1.js" "list2.js" this is a snipet of the java code.

function fillCategory(){
// this function is used to fill the category list on load
addOption(document.drop_list.Category, "bedfordshire", "Bedfordshire", "");
addOption(document.drop_list.Category, "berkshire", "Berkshire", "");
addOption(document.drop_list.Category, "buckinghamshire", "Buckinghamshire", "");
addOption(document.drop_list.Category, "cambridgeshire", "Cambridgeshire", "");

So basically what I want is either 1 or 3 java files each updating 3 seperate drop down lists.
I dont want to clog my html code up with 3 seperate lists of all the counties in the UK

I hope this is understandable.

Thanks in advance
urbanrays is offline   Reply With Quote
Reply


Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT. The time now is 09:41 PM.


Powered by vBulletin® Version 3.8.7
Copyright ©2000 - 2017, vBulletin Solutions, Inc.
Copyright 2006 DreamweaverClub.com