Solved

Populating javascript array from query

Posted on 2001-09-16
5
596 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
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
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

NEW Veeam Agent for Microsoft Windows

Backup and recover physical and cloud-based servers and workstations, as well as endpoint devices that belong to remote users. Avoid downtime and data loss quickly and easily for Windows-based physical or public cloud-based workloads!

Question has a verified solution.

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

Suggested Solutions

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…
Dramatic changes are revolutionizing how we build and use technology. Every company is automating, digitizing, and modernizing operations. We need a better, more connected way to work together as teams so we can harness the insights from our system…
The purpose of this video is to demonstrate how to set up basic WordPress SEO. This will be demonstrated using a Windows 8 PC. The plugin used will be WordPress SEO by Yoast. Go to your WordPress login page. This will look like the following: myw…
Viewers will learn how to use the UPDATE and DELETE statements to change or remove existing data from their tables. Make a table: Update a specific column given a specific row using the UPDATE statement: Remove a set of values using the DELETE s…

752 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