|
| |
|
|
SerenityNet
Posts: 1372 Joined: 6/12/2001 From: Allen, TX, USA Status: offline
|
ASP Case Statement to VBSCRIPT Statement - 5/25/2006 0:32:47
I'm trying to modify a script written in VBSCRIPT<%@LANGUAGE="VBSCRIPT" CODEPAGE="65001"%> My ASP "Case" statements don't work. Will someone please tell me how to write the equivalent to my ASP code (shown below) in VBSCRIPT? Or is there a way to declare to the sever, within a bunch of VBSCRIPT code, that a section is written in ASP Thanks, Andrew <%
Dim View
View = Request.QueryString("View")
Select Case View
Case "EN" %>
<!--#include file="resources-english.txt" -->
<% Case Else %>
<!--#include file="resources-spanish.txt" -->
<% End Select
%>
< Message edited by SerenityNet -- 5/25/2006 0:38:48 >
_____________________________
</Chaos, panic, & disorder - my work here is done.>
|
|
|
|
SerenityNet
Posts: 1372 Joined: 6/12/2001 From: Allen, TX, USA Status: offline
|
RE: ASP Case Statement to VBSCRIPT Statement - 5/25/2006 8:33:04
I didn't realize it was case sensitive, although my the case in the querystring match the case in my script. Anyway, it stil doesn't work. I'm getting an HTTP500 Internal Server Error. My querysting is: http://www.myweb.com/mysubweb/site.asp?View=EN or http://mysubweb.myweb.com/site.asp?View=EN as I'm running it in a subweb. When I have the following then I get the HTTP500 error.<%
Dim View
View = ucase(Request.QueryString("View"))
Select Case View
Case "EN" %>
<!--#include file="resources-english.txt" -->
<% Case Else %>
<!--#include file="resources-spanish.txt" -->
<% End Select
%> When I have just the include line then it works fine - although only in spanish.<!--#include file="resources-spanish.txt" --> I'm stumped.
_____________________________
</Chaos, panic, & disorder - my work here is done.>
|
|
|
|
den57
Posts: 25 Joined: 12/5/2005 Status: offline
|
RE: ASP Case Statement to VBSCRIPT Statement - 5/25/2006 21:29:22
Try this <%If ucase(Request.QueryString("View")) = "EN" then %> <!--#include file="resources-english.txt" --> <%Else%> <!--#include file="resources-spanish.txt" --> <%end if%>
|
|
|
|
SerenityNet
Posts: 1372 Joined: 6/12/2001 From: Allen, TX, USA Status: offline
|
RE: ASP Case Statement to VBSCRIPT Statement - 5/26/2006 1:20:39
Thanks Dennis. It turns out that the issue was not the case statement itself, but that it was implemented in a frameset. The same happened when I tried the IF statement. Spooky helped me via PM and we got the matter solved. Per Spooky, "As it was a frameset, the action of loading the differing frames reset the language to blank (which was ES) as the querystring wasnt included with any action." By setting a session variable, it worked. Thanks, Andrew
_____________________________
</Chaos, panic, & disorder - my work here is done.>
|
|
New Messages |
No New Messages |
Hot Topic w/ New Messages |
Hot Topic w/o New Messages |
Locked w/ New Messages |
Locked w/o New Messages |
|
Post New Thread
Reply to Message
Post New Poll
Submit Vote
Delete My Own Post
Delete My Own Thread
Rate Posts
|
|
|