0
Help Javascript Array
Contributor
,
/t5/coldfusion-discussions/help-javascript-array/td-p/779168
Feb 18, 2009
Feb 18, 2009
Copy link to clipboard
Copied
I am trying to validate an input field onkeyUp ie. to make
sure value is not in the DB already. See below Code.
I am getting error Object expected. What am I missing here. The Array I can see is populated with records from the cfquery. See Code below
I am getting error Object expected. What am I missing here. The Array I can see is populated with records from the cfquery. See Code below
TOPICS
Getting started
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting.
Learn more
Enthusiast
,
LATEST
/t5/coldfusion-discussions/help-javascript-array/m-p/779169#M72373
Feb 22, 2009
Feb 22, 2009
Copy link to clipboard
Copied
First thing is that js array index starts from zero while cf
starts from one.
I think you have created an array of arrays.
So, I think the following code
<cfoutput query="qryAllindicators">
myDesc[#qryAllindicators.CURRENTROW#]= new Array()
myDesc[#qryAllindicators.CURRENTROW#][#qryAllindicators.CURRENTROW#] = "#qryAllindicators.INDICATORDESC#"
</cfoutput>
Should be changed to
<cfoutput query="qryAllindicators">
myDesc[#qryAllindicators.CURRENTROW# - 1] = "#qryAllindicators.INDICATORDESC#"
</cfoutput>
Ken
I think you have created an array of arrays.
So, I think the following code
<cfoutput query="qryAllindicators">
myDesc[#qryAllindicators.CURRENTROW#]= new Array()
myDesc[#qryAllindicators.CURRENTROW#][#qryAllindicators.CURRENTROW#] = "#qryAllindicators.INDICATORDESC#"
</cfoutput>
Should be changed to
<cfoutput query="qryAllindicators">
myDesc[#qryAllindicators.CURRENTROW# - 1] = "#qryAllindicators.INDICATORDESC#"
</cfoutput>
Ken
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting.
Learn more

