mindytruitt
07-07-2004, 11:45 PM
I am having trouble with getting a drop down menu, so that when an option is choosen then the page refreshes to reflect that choice. I made a tester page just to see if I can get it to work, but it keeps bringing down the server. Does anyone see anything wrong or how it can change it so the server doesnt keep going down??
<cfquery name="charge" datasource="literature">
select *
from Users, Chargeability
WHERE Users.sales >=3 AND Chargeability.FiscalYear = #URL.ID#
Order By UserName
</cfquery>
<script language="javaScript">
<!--
function goto(form){var index=form.select.selectedIndex
if(form.select.options[index].value !="0")
{ location=form.select.options[index].value;}}
//-->
</script>
<html>
<body>
<cfoutput>
Fiscal Year:
<cfset year=#URL.ID#></cfoutput>
<select name = "FiscalYear" onchange="this.form.submit();">
<cfoutput>
<cfloop index="x" from="0" to="16" step="1">
<option value=tester.cfm?ID=#year#>#year#
<cfset year = year + 1>
</option>
</cfloop>
</cfoutput>
</select>
</html>
<cfquery name="charge" datasource="literature">
select *
from Users, Chargeability
WHERE Users.sales >=3 AND Chargeability.FiscalYear = #URL.ID#
Order By UserName
</cfquery>
<script language="javaScript">
<!--
function goto(form){var index=form.select.selectedIndex
if(form.select.options[index].value !="0")
{ location=form.select.options[index].value;}}
//-->
</script>
<html>
<body>
<cfoutput>
Fiscal Year:
<cfset year=#URL.ID#></cfoutput>
<select name = "FiscalYear" onchange="this.form.submit();">
<cfoutput>
<cfloop index="x" from="0" to="16" step="1">
<option value=tester.cfm?ID=#year#>#year#
<cfset year = year + 1>
</option>
</cfloop>
</cfoutput>
</select>
</html>



