Forum Moderators: phranque

Message Too Old, No Replies

PHP or Javascript

for long double drop down

         

old_expat

4:44 am on Jan 25, 2007 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



I'm trying to build a website where users can buy/sell certain items. The items are all university related and generally local.

I have found a pretty good list of Unis broken down by state. So I planned on using a double drop-down select menu where the Unis in a given state were auto-populated when the State was selected.

I found a couple of javascripts that should work, but it looks like the script would be 2500+ lines and maybe 200K.

I found another script which uses PHP plus some javascript " .. one function in JavaScript to handle the onchange event of the first drop down list box".

So I'm wondering which will probably be faster.

txbakers

9:10 pm on Jan 27, 2007 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



I like the second option - calling the database after the user selects a state.

You should look into AJAX for this, as it will go to the server and get the data without a whole round trip for the page.