Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations gkittelson on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Help converting ColdFusion to JSP within Javascript.

Status
Not open for further replies.

sknyppy

Programmer
May 14, 1999
137
US
Could someone please help me convert the cold fusion code to JSP inside this javascript function???
I've been trying for all day and can't get it right.

<script language=&quot;JavaScript&quot;>
// Pre-populate the Exchange and Route select boxes.
function getExchangeRoutes(obj){
switch (obj.ExchangeId.selectedIndex){
<CFOUTPUT query=&quot;qExchangeAndRoutes&quot; group=&quot;Exchange&quot;>
<CFSET mycase = mycase + 1>
case #mycase#:
<CFSET myList = ValueList(qExchangeAndRoutes.ExchangeId)>
<CFSET numberInExchange = ListValueCount(myList, ExchangeId)>
obj.RouteId.length=#numberInExchange#;
<CFOUTPUT>Rec Count: #qExchangeAndRoutes.RecordCount# - numberInExchange: #numberInExchange#</CFOUTPUT>
<CFOUTPUT>
<CFSET idx = idx + 1>
obj.RouteId.options[#idx#].value=&quot;#TRIM(qExchangeAndRoutes.RouteId)#&quot;;
obj.RouteId.options[#idx#].text=formatRoute('#qExchangeAndRoutes.RouteName#');
</CFOUTPUT>
break;
<CFSET idx = -1>
</CFOUTPUT>
}
}
</script>

Thanks,
Dave
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top