Solved

Populating javascript array from query

Posted on 2001-09-16
5
593 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
ID: 6487087
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
ID: 6487381
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
ID: 9281563
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
ID: 9552238
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

Ransomware-A Revenue Bonanza for Service Providers

Ransomware – malware that gets on your customers’ computers, encrypts their data, and extorts a hefty ransom for the decryption keys – is a surging new threat.  The purpose of this eBook is to educate the reader about ransomware attacks.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Suggested Solutions

Introduction In this tutorial, I'll explain how to create an animated progress meter in a wireframe prototype developed using Axure RP 7.0 - a leading prototyping tool for designing web sites and software. (For more information about Axure and gett…
I have a large data set and a SSIS package. How can I load this file in multi threading?
Using examples as well as descriptions, and references to Books Online, show the documentation available for datatypes, explain the available data types and show how data can be passed into and out of variables.
Viewers will learn how the fundamental information of how to create a table.

685 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