Solved

Populating javascript array from query

Posted on 2001-09-16
5
585 Views
Last Modified: 2013-12-16
I am developing a website in coldfusion and am pretty unfamiliar with javascript. I have also posted this question in the javascript area. I need to populate a javascript array with the following query. Could someone please help me figure this out.

<CFQUERY DATASOURCE="myDsn" NAME="myQueryName">
SELECT modelNum,partNum,defaultPrice,description
FROM components
</CFQUERY>


Thanks in advance

Doug

P.S God bless the U.S.A
0
Comment
Question by:DBrown
5 Comments
 
LVL 1

Expert Comment

by:deestuar
Comment Utility
Hi,
I've done something simialr with ASP before not with coldfusion. But is a general methodology
Scan through a record set building up a string array
of all the values in the recordset.
Write it out in your javascript code.

0
 
LVL 9

Accepted Solution

by:
miron earned 100 total points
Comment Utility
Make a struct in javascript, with mapping between recordset fields and the struct members. Instantiate an array of structs and assign values from recordset fields accordingly using dot separator to assign value to individual members of struct.
0
 

Expert Comment

by:CleanupPing
Comment Utility
DBrown:
This old question needs to be finalized -- accept an answer, split points, or get a refund.  For information on your options, please click here-> http:/help/closing.jsp#1
EXPERTS:
Post your closing recommendations!  No comment means you don't care.
0
 
LVL 34

Expert Comment

by:arbert
Comment Utility
No comment has been added lately, so it's time to clean up this TA.
I will leave a recommendation in the Cleanup topic area that this question is:

Accept Miron's Comment

Please leave any comments here within the next seven days.

PLEASE DO NOT ACCEPT THIS COMMENT AS AN ANSWER!

Arbert
EE Cleanup Volunteer
0

Featured Post

What Is Threat Intelligence?

Threat intelligence is often discussed, but rarely understood. Starting with a precise definition, along with clear business goals, is essential.

Join & Write a Comment

Objective of This Article In 1990’s, when I was a budding software professional, I had a lot of confusion about which stream or technology, I had to choose to build my career. In those days, I had lot of confusion like whether to choose System so…
International Data Corporation (IDC) prognosticates that before the current the year gets over disbursing on IT framework products to be sent in cloud environs will be $37.1B.
The purpose of this video is to demonstrate how to exclude a particular blog category from the main blog page. This is can be used when a category already has its own tab, or you simply want certain types of posts not to show up on the main blog. …
The purpose of this video is to demonstrate how to set up an RSS Feed on a WordPress Website. This will be demonstrated using a Windows 8 PC. Feedburner will be used for this demonstration. Go to your WordPress login page. This will look like the…

744 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

16 Experts available now in Live!

Get 1:1 Help Now