Jason,
I believe that Greg found the issue in the previous email with naming his query differently from the name of the columns defined in the query.

Teddy

On 8/21/06, West, Jason <[EMAIL PROTECTED]> wrote:

But the error said it could not find the query, would this be the cause of the error with defining the boundaries?

 

-JLW

 


From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]] On Behalf Of Teddy Payne
Sent: Monday, August 21, 2006 11:30


To: discussion@acfug.org
Subject: Re: [ACFUG Discuss] Embedded CF in _javascript_

 

<cfloop query="Category" startrow="1" endrow="#Category.RecordCount#">

You do not have to define the boundaries of the query when using cfloop.

<cfloop query="Category">


Teddy

On 8/21/06, McTure, Greg <[EMAIL PROTECTED]> wrote:

Here are the parts of my code that the error is referring to.  Be mindful that this functionality and code works nicely as intended on all three CFMX machines but not on the lone CF5 machine.

 

The code is simply for dependent select drop-downs.  The first drop down displays the major categories form the database and the 2nd and 3rd drop down equally displays the sub categories of the category selected in the first drop down.

 

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"

" http://www.w3.org/TR/html4/loose.dtd">

<cfquery name="Category" datasource="EPLCommunity">

            SELECT ID, Category

            FROM Business_Cats

            WHERE SubCatOf = 0

            ORDER BY Category

</cfquery>

<html>

<head>

<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">

 

<SCRIPT LANGUAGE="_javascript_">

 

<!-- Begin

biz_cat = new Array(

<cfloop query="Category" startrow="1" endrow="#Category.RecordCount#">

<cfquery name="SubCategory" datasource="EPLCommunity">

            SELECT ID, Category

            FROM Business_Cats

            WHERE SubCatOf = #ID#

            ORDER BY Category

</cfquery>

new Array(

 

<CFLOOP query="SubCategory" startrow="1" endrow="#SubCategory.RecordCount#">

<CFOUTPUT>

new Array("#SubCategory.Category#", #SubCategory.ID#)<CFIF SubCategory.CurrentRow LT SubCategory.RecordCount>,</CFIF>

</CFOUTPUT>

</CFLOOP>

)<CFIF Category.CurrentRow LT Category.RecordCount>,</CFIF>

</CFLOOP>

);

 

function fillSelectFromArray(selectCtrl, itemArray, goodPrompt, badPrompt, defaultItem) {

var i, j;

var prompt;

// empty existing items

for (i = selectCtrl.options.length; i >= 0; i--) {

selectCtrl.options[i] = null;

}

prompt = (itemArray != null) ? goodPrompt : badPrompt;

if (prompt == null) {

j = 0;

}

else {

selectCtrl.options[0] = new Option(prompt);

j = 1;

}

if (itemArray != null) {

// add new items

for (i = 0; i < itemArray.length; i++) {

selectCtrl.options[j] = new Option(itemArray[i][0]);

if (itemArray[i][1] != null) {

selectCtrl.options[j].value = itemArray[i][1];

}

j++;

}

// select first item (prompt) for sub list

selectCtrl.options[0].selected = true;

   }

}

//  End -->

</script>


From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]] On Behalf Of Teddy Payne
Sent: Monday, August 21, 2006 10:14 AM
To: discussion@acfug.org
Subject: Re: [ACFUG Discuss] Embedded CF in _javascript_

 

We would need to see the code that the error is referring to.

Teddy

On 8/21/06, McTure, Greg <[EMAIL PROTECTED] > wrote:

This is a general question to see if anyone has ran into issues with embedded CFML code in _javascript_ with a page working in CFMX and not in CF5?  The code I have works as intended in CFMX but I get the following error on CF5?  Any suggestions that anyone may have on the cause and/or resolution of this will be greatly appreciated.  Thanks in advance.

 

Error Diagnostic Information

Cannot set default query to CATEGORY

A query by this name is not available at this time

The error occurred while processing an element with a general identifier of (CFLOOP), occupying document position (257:1) to (257:76).

 


-------------------------------------------------------------
To unsubscribe from this list, manage your profile @
http://www.acfug.org?fa=login.edituserform

For more info, see http://www.acfug.org/mailinglists
Archive @ http://www.mail-archive.com/discussion%40acfug.org/
List hosted by FusionLink
-------------------------------------------------------------




--
<cf_payne />

Blog: http://cfpayne.wordpress.com/
Atlanta CFUG: http://www.acfug.org
-------------------------------------------------------------
To unsubscribe from this list, manage your profile @
http://www.acfug.org?fa=login.edituserform

For more info, see http://www.acfug.org/mailinglists
Archive @ http://www.mail-archive.com/discussion%40acfug.org/
List hosted by FusionLink
-------------------------------------------------------------


-------------------------------------------------------------
To unsubscribe from this list, manage your profile @
http://www.acfug.org?fa=login.edituserform

For more info, see http://www.acfug.org/mailinglists
Archive @ http://www.mail-archive.com/discussion%40acfug.org/
List hosted by FusionLink
-------------------------------------------------------------




--
<cf_payne />

Blog: http://cfpayne.wordpress.com/
Atlanta CFUG: http://www.acfug.org
-------------------------------------------------------------
To unsubscribe from this list, manage your profile @
http://www.acfug.org?fa=login.edituserform

For more info, see http://www.acfug.org/mailinglists
Archive @ http://www.mail-archive.com/discussion%40acfug.org/
List hosted by FusionLink
-------------------------------------------------------------


-------------------------------------------------------------
To unsubscribe from this list, manage your profile @
http://www.acfug.org?fa=login.edituserform

For more info, see http://www.acfug.org/mailinglists
Archive @ http://www.mail-archive.com/discussion%40acfug.org/
List hosted by FusionLink
-------------------------------------------------------------



--
<cf_payne />

Blog: http://cfpayne.wordpress.com/
Atlanta CFUG: http://www.acfug.org
-------------------------------------------------------------
To unsubscribe from this list, manage your profile @
http://www.acfug.org?fa=login.edituserform

For more info, see http://www.acfug.org/mailinglists
Archive @ http://www.mail-archive.com/discussion%40acfug.org/
List hosted by FusionLink
-------------------------------------------------------------

Reply via email to