Andrew
asked on
elseif syntax?
Can someone please help me understand why this gives me an error and how to correct it?
ERROR:
<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>
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
--------------------------------------------------------------------------------^
ASKER
that didnt seem to work...
Microsoft VBScript compilation error '800a0400'
Expected statement
/corpcardnew/Default.asp, line 64
If Request.querystring("loadC urrent") = 1 Then "EditCurrent.asp" ElseIf Request.querystring("loadC urrent") = 2 Then "main.htm" Else "main.htm" End If
-------------------------- ---------- ---------- -^
Microsoft VBScript compilation error '800a0400'
Expected statement
/corpcardnew/Default.asp, line 64
If Request.querystring("loadC
--------------------------
ASKER
are the double quotes around "EditCurrent.asp" possibly breaking this?
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
i mean replace the line
Response.write "EditCurrent.asp"
with only
"EditCurrent.asp"