Error on loading ASP page with VBScript

F

Frank

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
..
 
C

Curt_C [MVP]

FYI, it's not an ASP issue. You are doing CLIENTSIDE VBScript.... (eeek).
Stick to javascript on the client for compatability.
 
C

Curt_C [MVP]

but what you are doing isn't ASP...
<script language=VBScript>...</script> is CLIENTSIDE, not SERVER
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,766
Messages
2,569,569
Members
45,042
Latest member
icassiem

Latest Threads

Top