Exit
  • Global community
    • Language:
      • Deutsch
      • English
      • Español
      • Français
      • Português
  • 日本語コミュニティ
  • 한국 커뮤니티
0

Javascript Help

New Here ,
Feb 13, 2009 Feb 13, 2009
I found some javascipt code off the internet. Here is some partial code :

// State lists
var states = new Array();

states['Canada'] = new Array('Alberta','British Columbia','Ontario');
states['Mexico'] = new Array('Baja California','Chihuahua','Jalisco');
states['United States'] = new Array('California','Florida','New York');

For the new Array part, instead of hard coding the cities, how do I do it dynamically ?

I query my table for the cities and want to insert #qry.city# in the new Array. I tried it and it does not work. What is the proper way/syntax to do this ? I do not want to hardcode all the cities and want it to be populated with the results from the query.
242
Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
LEGEND ,
Feb 14, 2009 Feb 14, 2009
LATEST
toscript()

Details are in the cfml reference manual. If you don't have one, the internet does.
Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Resources