:-)   Can you get the result set back using <cfdump> also, can you just dump
the data out as a test without all of the Javascript?

-----Original Message-----
From: Ian Vaughan [mailto:[EMAIL PROTECTED]]
Sent: 06 January 2003 15:50
To: CF-Talk
Subject: Loop Errors


Does anybody have any ideas on why I am getting a loop error from my code
below I cant see why this is happening, any suggestions would be most
helpful thanks...

Error Occurred While Processing Request
Error Diagnostic Information
Loop error


The error occurred while processing an element with a general identifier of
(CFOUTPUT), occupying document position (23:1) to (23:42).


Date/Time: Mon Jan 06 15:49:37 2003
Browser: Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1)
Remote Address: 121.100.25.2



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

<html>
<head>
     <title>Untitled</title>
</head>

<body>
<!--- Select the ATA_Chapter, ATA_Section and title_Codes. --->
<cfquery name="rsquery1" datasource="intranetv8">
SELECT a.category, a.catno, a.parent_level, b.category, b.catno,
b.parent_level
FROM category_menu a, category_menu b

WHERE a.parent_level = b.catno

ORDER BY a.category, b.category
</cfquery>
<!--- Select all the sub codes. --->
<script language = "JavaScript">
<!--
// For each chapter, create an array to hold the sections.
// Each chapter array will be identified by the ATA_Chapter
<cfoutput query="rsATA1" group="category">
// Create the array
ChapterArray#category# = new Array();
ChapterArrayVal#category# = new Array();
<cfset i = 0>
// Populate the array
<cfoutput>
<cfset i = i + 1>
ChapterArray#category#[#i#] = #category#;
ChapterArrayVal#category#[#i#] = "#catno# #category#";
</cfoutput>
</cfoutput>


// Function to populate the ATA_Sub_Codes for the ATA_Code selected
function PopulateATASubCode() {
// Only process the function if the first item is not selected.
var indx = document.InsertForm.ATACode.selectedIndex;
if (indx != 0) {
// Find the Chapter
var ThisChapter = document.InsertForm.ATACode[indx].value;
// Set the length of the ATA_Sub_Codes drop down equal to the length of the
Chapter's array
var len;
len = eval("ChapterArray" + ThisChapter + ".length");
document.InsertForm.ATA_SubCode.length = len;
// Put 'Select' as the first option in the SubCode drop-down
document.InsertForm.ATA_SubCode[0].value = "";
document.InsertForm.ATA_SubCode[0].text = "Select ATA Sub Code";
document.InsertForm.ATA_SubCode[0].selected = true;
// Loop through the chapter's array and populate the SubCode drop down.
for (i=1; i<len; i++) {
document.InsertForm.ATA_SubCode.value = eval("ChapterArray" + ThisChapter +
"");
document.InsertForm.ATA_SubCode.text = eval("ChapterArrayVal" + ThisChapter
+ "");
}
}
}
//-->
</script>

<html>
<head>
<title>Requirements Database Add Requirement</title>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
</head>
<body>
<form action="<cfoutput>#CurrentPage#</cfoutput>" method="POST"
name="InsertForm" id="InsertForm">
<table>
<tr>
<td> <select name="ATACode" onChange="PopulateATASubCode();">
<option value="0">Select ATA Code <cfoutput query="rsATA1" group="category">
<option value="#ATA_Chapter#">#category# </cfoutput>
</select>
<select name="ATA_SubCode" size="1">
<option value="0">Select ATA Sub Code
</select></td>
</tr>
</table>



</body>
</html>




~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~|
Archives: http://www.houseoffusion.com/cf_lists/index.cfm?forumid=4
Subscription: 
http://www.houseoffusion.com/cf_lists/index.cfm?method=subscribe&forumid=4
FAQ: http://www.thenetprofits.co.uk/coldfusion/faq
Signup for the Fusion Authority news alert and keep up with the latest news in 
ColdFusion and related topics. http://www.fusionauthority.com/signup.cfm

                                Unsubscribe: 
http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=89.70.4

Reply via email to