Wrox Programmer Forums
Go Back   Wrox Programmer Forums > Web Programming > JavaScript > Javascript How-To
|
Javascript How-To Ask your "How do I do this with Javascript?" questions here.
Welcome to the p2p.wrox.com Forums.

You are currently viewing the Javascript How-To section of the Wrox Programmer to Programmer discussions. This is a community of software programmers and website developers including Wrox book authors and readers. New member registration was closed in 2019. New posts were shut off and the site was archived into this static format as of October 1, 2020. If you require technical support for a Wrox book please contact http://hub.wiley.com
 
Old July 24th, 2010, 12:45 PM
Authorized User
 
Join Date: Dec 2009
Posts: 85
Thanks: 16
Thanked 0 Times in 0 Posts
Default populating drop down boxes

Hi Joe

I'm using your example as you code which works great with 2 options but when I add a third it doesn't seem to work?

i.e

{country: "USA", areas: ["Texas", "California", "Arizona"]}, //Default country to show
{country: "UK", areas: ["Devon", "Staffordshire", "London"]}
{country: "South Africa", areas: ["1", "2", "3"]}

Any ideas?

thanks

Adam
 
Old July 24th, 2010, 02:13 PM
joefawcett's Avatar
Wrox Author
 
Join Date: Jun 2003
Posts: 3,074
Thanks: 1
Thanked 38 Times in 37 Posts
Default

You need a comma after the closing brace between countries.
Code:
"London"]},
__________________
Joe
http://joe.fawcett.name/
The Following User Says Thank You to joefawcett For This Useful Post:
adamhw (July 24th, 2010)





Similar Threads
Thread Thread Starter Forum Replies Last Post
Dependent drop down list advice Clint Javascript 2 September 15th, 2009 12:10 PM
dependent drop downs p2pMember ASP.NET 1.0 and 1.1 Professional 0 July 19th, 2006 05:25 AM
3 Drop Down box w/ db values & dependent choices smarks Classic ASP Databases 1 March 2nd, 2005 03:32 PM
Populating Drop Down based on other drop down jeffbarclay Java Databases 1 November 7th, 2003 12:14 PM
Two drop down dependent list boxes and a Button tcasp Classic ASP Basics 0 August 5th, 2003 02:06 PM





Powered by vBulletin®
Copyright ©2000 - 2020, Jelsoft Enterprises Ltd.
Copyright (c) 2020 John Wiley & Sons, Inc.