How NOT to Code - Example 2
Second challenge is below..
<select name="cexpyear">
<option value="00" >cfif cexpyear eq "00"<selected>/cfif<>00
<option value="01" >cfif cexpyear eq "01"<selected>/cfif<>01
<option value="02" >cfif cexpyear eq "02"<selected>/cfif<>02
<option value="03" >cfif cexpyear eq "03"<selected>/cfif<>03
<option value="04" >cfif cexpyear eq "04"<selected>/cfif<>04
<option value="05" >cfif cexpyear eq "05"<selected>/cfif<>05
<option value="06" >cfif cexpyear eq "06"<selected>/cfif<>06
<option value="07" >cfif cexpyear eq "07"<selected>/cfif<>07
<option value="08" >cfif cexpyear eq "08"<selected>/cfif<>08
<option value="01" >cfif cexpyear eq "09"<selected>/cfif<>09
<option value="10" >cfif cexpyear eq "10"<selected>/cfif<>10
<option value="11" >cfif cexpyear eq "11"<selected>/cfif<>11
<option value="12" >cfif cexpyear eq "12"<selected>/cfif<>12
</select>
Dave Ferguson wrote on 01/11/1011:07 AM
I would just simplify the code and put the options into a loop. I would post the code to do it but I am not sure it would make it through. Also, the var cexpyear is not scoped.--Dave