Forum Moderators: open

Message Too Old, No Replies

Error Driving me insane Please help

Expected statement error

         

jerrybentoak

2:04 pm on Sep 30, 2008 (gmt 0)

10+ Year Member



I am getting an expected statement error line 61 Here is the code not all of it, but the general area that it is occuring. The last line listed will be line 61

Thanks for any help

<ul id="Bar2">
<li onclick="window.location='directory.asp?Cat=2'" <% If Cat = "2" Then Response.Write "id=""Selected""" End If %>>
<a href="directory.asp?Cat=2">Tuxedos</a>
</li>
<li onclick="window.location='directory.asp?Cat=4'" <% If Cat = "4" Then Response.Write "id=""Selected""" End If %>>
<a href="directory.asp?Cat=4">Flowers</a>
</li>
<li onclick="window.location='directory.asp?Cat=6'" <% If Cat = "6" Then Response.Write "id=""Selected""" End If %>>
<a href="directory.asp?Cat=6">Video</a>
</li>
<li onclick="window.location='directory.asp?Cat=8'" <% If Cat = "8" Then Response.Write "id=""Selected""" End If %>>
<a href="directory.asp?Cat=8">Planners</a>
</li>
<li onclick="window.location='directory.asp?Cat=10'" <% If Cat = "10" Then Response.Write "id=""Selected""" End If %>>
<a href="directory.asp?Cat=10">Salons</a>
</li>
<li onclick="window.location='directory.asp?Cat=12'" <% If Cat = "12" Then Response.Write "id=""Selected""" End If %>>
<a href="directory.asp?Cat=12">Stationary</a>
</li>
<li onclick="window.location='directory.asp?Cat=14'" <% If Cat = "14" Then Response.Write "id=""Selected""" End If %>>
<a href="directory.asp?Cat=14">Receptions</a>
</li>
<li onclick="window.location='directory.asp?Cat=16'" <% If Cat = "16" Then Response.Write "id=""Selected""" End If %>>
<a href="directory.asp?Cat=16">Favors</a>
</li>
<li id="Last" onclick="window.location='directory.asp?Cat=18'" <% If Cat = "18" Then Response.Write "id=""Selected_Last"""
End If %>><a href="directory.asp?Cat=18">Honeymoon</a>

carguy84

4:39 pm on Sep 30, 2008 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



Hey,
Remove all the "End If"s. If your 'if' statement is on one line, you can't put "End If" in.

Also, you might want to put parenthesis around your ID attributes (cleaner).

Chip-

jerrybentoak

5:33 pm on Sep 30, 2008 (gmt 0)

10+ Year Member



Works like a champ, thanks for the help..Sometimes the simplest things wear you out
J