The error is:
error expected ';'
If I try top run it I get:
a.temp1 is not defined
Here is the code:
<CFQUERY NAME="search" DATASOURCE="brinventory">
SELECT DISTINCT lookup.type
FROM steel, lookup
WHERE steel.type_id = lookup.type_id
</CFQUERY>
<CFQUERY NAME="search2" DATASOURCE="brinventory">
SELECT DISTINCT steel.length
FROM steel, lookup
WHERE steel.type_id = lookup.type_id
</CFQUERY>
<CFQUERY NAME="search3" DATASOURCE="brinventory">
SELECT DISTINCT steel.width
FROM steel, lookup
WHERE steel.type_id = lookup.type_id
</CFQUERY>
<cfset i = 0>
<script language="JavaScript1.2">
aTemp1 = new Array();
<cfoutput query="search">
aTemp1[#i#] = "#type#";
<cfset i = i + 1>
</cfoutput>
</script>
<cfset i = 0>
<script language="JavaScript1.2">
aTemp2 = new Array();
<cfoutput query="search2">
aTemp2[#i#] = "#length#";
<cfset i = i + 1>
</cfoutput>
</script>
<script language="JavaScript1.2">
function foo()
{
document.forms[0].one.length = aTemp1.length;
for(i=0;i<aTemp1.length;i++)
{
document.forms[0].one.options[i].text = aTemp1[i];
document.forms[0].one.options[i].value = aTemp1[i];
}
}
function bar()
{
document.forms[0].two.length = aTemp2.length;
for(i=0;i<aTemp2.length;i++)
{
document.forms[0].two.options[i].text = aTemp2[i];
document.forms[0].two.options[i].value = aTemp2[i];
}
}
</script>
<form>
<input type="button" name="test" value="test" onclick="foo()">
<select name="one" onblur="bar()">
</select>
<select name="two">
</select>
</form>
______________________________________________________________________
This list and all House of Fusion resources hosted by CFHosting.com. The place for
dependable ColdFusion Hosting.
FAQ: http://www.thenetprofits.co.uk/coldfusion/faq
Archives: http://www.mail-archive.com/[email protected]/
Unsubscribe: http://www.houseoffusion.com/index.cfm?sidebar=lists