Hi
Some simple code written for IE, doesnt work in the increasingly popular browser. Sure its easily fixed...
This is actually coldfusion code but its a javascript thing - define my function goto(form) called by "onchange=goto(this.form)"
tried changing function to something simpler. Nothing happens, works fine in IE
Any suggestions??
Cheers
Tim
<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>
<table cellpadding=0 cellspacing=0>
<FORM name=form1>
<TR>
<TD vAlign=top align=left colspan="3">
<br>
<SELECT
style="FONT-SIZE: 8pt; BACKGROUND: #000066; WIDTH: 250px; COLOR: white; FONT-FAMILY: Verdana, Arial, Helvetica, sans-serif"
onchange=goto(this.form) align=left size=1 name=select>
<OPTION style="BACKGROUND: #000066; COLOR: #FFFFFF" value=""
selected>Current reports</OPTION>
<!--- first was BACKGROUND: #99ccFF; COLOR: #000066 --->
<cfoutput><cfloop from="1" to="#showreports.recordcount#" index="i">
<OPTION
value=#linknames#>#arraynames#</OPTION>
</cfloop> </cfoutput>
</SELECT></TD></TR>
</FORM>
</table>
Some simple code written for IE, doesnt work in the increasingly popular browser. Sure its easily fixed...
This is actually coldfusion code but its a javascript thing - define my function goto(form) called by "onchange=goto(this.form)"
tried changing function to something simpler. Nothing happens, works fine in IE
Any suggestions??
Cheers
Tim
<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>
<table cellpadding=0 cellspacing=0>
<FORM name=form1>
<TR>
<TD vAlign=top align=left colspan="3">
<br>
<SELECT
style="FONT-SIZE: 8pt; BACKGROUND: #000066; WIDTH: 250px; COLOR: white; FONT-FAMILY: Verdana, Arial, Helvetica, sans-serif"
onchange=goto(this.form) align=left size=1 name=select>
<OPTION style="BACKGROUND: #000066; COLOR: #FFFFFF" value=""
selected>Current reports</OPTION>
<!--- first was BACKGROUND: #99ccFF; COLOR: #000066 --->
<cfoutput><cfloop from="1" to="#showreports.recordcount#" index="i">
<OPTION
value=#linknames#>#arraynames#</OPTION>
</cfloop> </cfoutput>
</SELECT></TD></TR>
</FORM>
</table>