Link to home
Start Free TrialLog in
Avatar of Andrew
AndrewFlag for United States of America

asked on

elseif syntax?

Can someone please help me understand why this gives me an error and how to correct it?

<iframe name="main" width="89%" height="100%" align="right" frameborder="0" style="background-color:#FFFFFF; overflow:hidden;" src="<% If Request.querystring("loadCurrent") = 1 Then Response.write "EditCurrent.asp" ElseIf Request.querystring("loadCurrent") = 2 Then Response.write "main.htm" Else Response.write "main.htm" End If %>"></iframe>

Open in new window


ERROR:
Microsoft VBScript compilation error '800a0401' 

Expected end of statement 

/corpcardnew/Default.asp, line 64 

If Request.querystring("loadCurrent") = 1 Then Response.write "EditCurrent.asp" ElseIf Request.querystring("loadCurrent") = 2 Then Response.write "main.htm" Else Response.write "main.htm" End If
--------------------------------------------------------------------------------^

Open in new window

Avatar of Lalit Chandra
Lalit Chandra
Flag of India image

Remove   Response.write.
i mean replace the line
 Response.write "EditCurrent.asp"
with only
"EditCurrent.asp"
Avatar of Andrew

ASKER

that didnt seem to work...


Microsoft VBScript compilation error '800a0400'

Expected statement

/corpcardnew/Default.asp, line 64

If Request.querystring("loadCurrent") = 1 Then "EditCurrent.asp" ElseIf Request.querystring("loadCurrent") = 2 Then "main.htm" Else "main.htm" End If
-----------------------------------------------^
Avatar of Andrew

ASKER

are the double quotes around "EditCurrent.asp"  possibly breaking this?
ASKER CERTIFIED SOLUTION
Avatar of Big Monty
Big Monty
Flag of United States of America image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
SOLUTION
Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
SOLUTION
Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial