Groups | Blog | Home
all groups > inetserver asp general > august 2003 >

inetserver asp general : Error on loading ASP page with VBScript



Frank
8/20/2003 2:23:19 PM
When I used IE 6.0 to view the ASP page on Window 2000
server PC, I encountered the error message: "Expected end
of statement".

The ASP page code is as:
******************************************************
<script language="VBScript">
function vb_Test(ptValue)
vb_Test = ptValue
end function
</script>
<HTML>
<BODY onLoad="document.body.style.cursor='default';">
test text
</BODY>
</HTML>
******************************************************

This problem only happens when the VBScript code block is
at the beginning of the ASP page.

Seems the browser treats the single quote that exists in
the inline event JavaScript code as a comment symbol in
VBScript and it would not tolerate it.

To solve this problem:
1. Add a block of JavaScript code block above that
VBScript code block.
2. Remove the single quote in the inline event code.
3. Move the inline event code to a JavaScript function.

Any one has any idea or aware of this problem?

Thanks,
Frank
..

Curt_C [MVP]
8/20/2003 5:21:43 PM
FYI, it's not an ASP issue. You are doing CLIENTSIDE VBScript.... (eeek).
Stick to javascript on the client for compatability.

--
----------------------------------------------------------
Curt Christianson (Software_AT_Darkfalz.Com)
Owner/Lead Designer, DF-Software
http://www.Darkfalz.com
---------------------------------------------------------
...Offering free scripts & code snippits for everyone...
---------------------------------------------------------


[quoted text, click to view]

AddThis Social Bookmark Button