...

View Full Version : need faster way to fill drop down box and display in text area



katalyst
10-20-2007, 10:49 PM
hey guys, need to see if someone can come up with a faster way to do things than the way ive done...

what i have is a simple drop down box which i need to get populated with store corporate numbers 001-599. what i need is for a text area to display a store name and 4 links for each selection of the drop down box...

what ive had to do is put about 600 option tags and for the store's info and links, ive had to put them in an array using javascript... this is sooo tedious and time consuming. .theres gotta be a better way to do this

so for example: in the drop down box, "001" would be selected and that would display in a <div> directly under it the text "Store 1: LINK1 LINK2"

how can i more quickly populate this drop down box? and also, how can i display that data for each corporate number easier?

right now, i have no serverside languages available to me... is it possible to read it from an excel spreadsheet local? or from a text file?

thanks for the help!

nikkiH
10-21-2007, 05:24 PM
Beg, borrow, or steal for server-side. :)
This should be in a database and get generated from the server / AJAX.

Other than that, how would maintaining a excel file or text file be any easier than an array? Normally, no, javascript is client side. It can't read stuff on the server and has no permissions to read from the client.

If this is not a "normal" web site, mention that, because HTA and other situations do allow for it.

dcostalis
10-21-2007, 05:49 PM
Why not have a text input box instead? If they type in the store number, then it loads the store info for that store. If that number doesn't exist, output error message.

Or, probably a quicker implementation would be to split it up. Have 6 groups of 100, and populate a smaller amount at a time. It gives about an extra 1/2 second of work to the user, but would load the database 500% faster.

These are only "quick fix" suggestions. Listen to nikkiH and get some server action here.

katalyst
10-21-2007, 08:55 PM
my bad, reason i mentioned i couldnt use server side languages was because this is a "localhost" type site for now. basically a page i pull up on my desktop that has a lot of quicklinks for myself of things i use frequently during the shift at work.

ive got the dropdown box populated at this point. not looking forward to "filling the array" with each store's info.... lot of copy and paste coding..

FishMonger
10-21-2007, 09:39 PM
my bad, reason i mentioned i couldnt use server side languages was because this is a "localhost" type site for now. basically a page i pull up on my desktop that has a lot of quicklinks for myself of things i use frequently during the shift at work.

ive got the dropdown box populated at this point. not looking forward to "filling the array" with each store's info.... lot of copy and paste coding..

What's stopping you from installing a web server and scripting language on your local station?

The best and easiest approach is to use a server side language such as Perl or PHP as well as a database such as MySQL and build the page dynamically. IMO, manually populating a javascript array is probably one of the worst approaches.

shyam
10-22-2007, 09:04 AM
hey guys, need to see if someone can come up with a faster way to do things than the way ive done...

what i have is a simple drop down box which i need to get populated with store corporate numbers 001-599. what i need is for a text area to display a store name and 4 links for each selection of the drop down box...


can u post portions of the relevant code?

nikkiH
10-22-2007, 06:26 PM
If you have localhost, how do you not have classic ASP available?
Are you not on a windows box with IIS?



EZ Archive Ads Plugin for vBulletin Copyright 2006 Computer Help Forum