View Full Version : Javascript Help Needed for a Beginner
daniah
Apr 18th 2007, 12:30 am
Hi,
I need two drop down menus
1: Country
2: City
If i choose the country as USA using the "country" drop down menu then for the 2nd "CITY" drop down menu i need only USA cities to be displayed.
How can i do it via Javascript? Pls help!
Thanks In advance
Daniah
phper
Apr 18th 2007, 12:55 am
You can do this with Ajax. Have a look at this tutorial:
http://www.php-etc.com/tutorials/Ajax/
The demo should be very similar to what you want to do here (only with different menu items):
http://www.php-etc.com/tutorials/Ajax/demo.php
senloong
Apr 18th 2007, 1:15 am
Cool Ajax tutorial!
daniah
Apr 18th 2007, 11:10 am
You can do this with Ajax. Have a look at this tutorial:
http://www.php-etc.com/tutorials/Ajax/
The demo should be very similar to what you want to do here (only with different menu items):
http://www.php-etc.com/tutorials/Ajax/demo.php
Hey thanks for the tutorials, but i can't find the source code for this demo. Also, can't this be done via simple javascript?
ajsa52
Apr 18th 2007, 2:20 pm
Here you'll find different multi-levels Menus (http://www.dynamicdrive.com/dynamicindex1/indexc.html)
Maybe the "Chained Select menu" from that page is what you're looking for.
phper
Apr 19th 2007, 8:58 pm
Hi daniah,
The javascript source code for the demo is in this file: /script/tutorials/ajax_demo.js
vBulletin® v3.8.4, Copyright ©2000-2009, Jelsoft Enterprises Ltd.