Skip to main content
Known Participant
February 14, 2009
Question

Javascript Help

  • February 14, 2009
  • 1 reply
  • 274 views
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.
    This topic has been closed for replies.

    1 reply

    Inspiring
    February 14, 2009
    toscript()

    Details are in the cfml reference manual. If you don't have one, the internet does.