Welcome to WebmasterWorld Guest from 3.92.92.168

Forum Moderators: ocean10000

Message Too Old, No Replies

Error Driving me insane Please help

Expected statement error

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

New User

10+ Year Member

joined:Sept 30, 2008
posts: 3
votes: 0


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>

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

Senior Member

WebmasterWorld Senior Member 10+ Year Member

joined:Feb 13, 2005
posts:1078
votes: 0


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-

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

New User

10+ Year Member

joined:Sept 30, 2008
posts:3
votes: 0


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