Frosty1_4me
11-22-2004, 10:54 AM
I have a site that used to use Coldfusion, and I would like to remove the CFOUTPUT tags code from the javascript. I would really like it converted to .net, but I've never seen a dropdown list populated dynamically from a file and not a database before.
So I'll settle with the removal of the CF tags from the javascript. Could someone please help??
<SCRIPT LANGUAGE="JavaScript">
<!--- Populates the dropdown list for the symbols to be selected --->
function getSymbols()
{
var map = getMainMap();
var theSymColl = map.getSymbols();
var opt = new Option("-- Select a symbol --", "null");
eval("document.draw_form.draw_symbol_name.options[0]=opt");
for (var i=0; i < theSymColl.size(); i++){
var opt = new Option(theSymColl.item(i), theSymColl.item(i));
eval("document.draw_form.draw_symbol_name.options[i+1]=opt");
<CFIF ISDEFINED("DRAW_SYMBOL_NAME")>
<CFOUTPUT>
var selectedSym = "#DRAW_SYMBOL_NAME#";
</CFOUTPUT>
if (theSymColl.item(i) == selectedSym){
document.draw_form.draw_symbol_name.options[i+1].selected=true;
}
</CFIF>
}
}
</script>
So I'll settle with the removal of the CF tags from the javascript. Could someone please help??
<SCRIPT LANGUAGE="JavaScript">
<!--- Populates the dropdown list for the symbols to be selected --->
function getSymbols()
{
var map = getMainMap();
var theSymColl = map.getSymbols();
var opt = new Option("-- Select a symbol --", "null");
eval("document.draw_form.draw_symbol_name.options[0]=opt");
for (var i=0; i < theSymColl.size(); i++){
var opt = new Option(theSymColl.item(i), theSymColl.item(i));
eval("document.draw_form.draw_symbol_name.options[i+1]=opt");
<CFIF ISDEFINED("DRAW_SYMBOL_NAME")>
<CFOUTPUT>
var selectedSym = "#DRAW_SYMBOL_NAME#";
</CFOUTPUT>
if (theSymColl.item(i) == selectedSym){
document.draw_form.draw_symbol_name.options[i+1].selected=true;
}
</CFIF>
}
}
</script>