Click to See Complete Forum and Search --> : Can't execute ANY VBScript


Bounty Bob
November 5th, 2002, 09:11 AM
Hi all,

Below is a HTML file. It contains VBScript to display a messagebox. Can
anyone see any obvious reason why it doesn't display the messagebox? I've
converted it to Javascript (ie. alert("Hello");) and it works fine. I've
also tried looking though the security settings to see if there was any
VBScript specific settings there and couldn't find any.

Any thoughts/solutions appreciated,

Rob

<html>
<head>
<title>Untitled</title>
</head>
<body>
Start
<Script Language="VBScript">
msgbox "Hello"
</SCRIPT>
End
</body>
</html>

Bounty Bob
November 5th, 2002, 11:37 AM
This problem only occurs on 1 PC out of about 20.

All have VBScript V.5.5.0.5207 installed.

The VBScript code is being ignored in the same way it would if I had inserted the line <Script Language="DontExist"> instead of <Script Language="VBScript">

websmith99
November 5th, 2002, 02:00 PM
Could you provide more info...

This is obviously not an ASP page otherwise you would
have done:

<%@ LANGUAGE=VBScript %>
<%
msgbox "Hello"
%>

So if it's not an ASP architecture why are you trying to use VBScript? Do all of the PC's have the same version of Internet Explorer installed?

Bounty Bob
November 6th, 2002, 03:40 AM
No, it's not an ASP page. The Web Page I have problems with creates an Excel Chart client-side. I know, I know, I should install Office Web Classes on the Server. However, try telling our computer services department that!!! So, back to the problem. The WebApp will only ever be used on our company intranet. All PC's have Office 97 installed so there should be no trouble with people generating charts. However, client-side VBScript is simply ignored. Server-side script (used in other pages) is fine. As I mentioned, the problem only occurs on 1 PC out of 20. I'm at a loss to understand why because all the IE security settings are the same for all PC's (same version of IE on all PC's as well).

Bounty Bob
November 7th, 2002, 01:55 AM
Intranet Security Settings are:-

ActiveX controls and plug-ins : All Enabled
Cookies : All Enabled
Downloads : All Enabled
Java Permissions : Medium Security
Miscellaneous
Access data sources across domains : Prompt
Dont promp for client certificate... : Enable
Drag and drop or copy and paste files : Enable
Installations of desktop items : Prompt
Launching programs and files in an IFRAME : Prompt
Navigate sub-frames across different domains : Enable
Software channel permissions : Medium safety
Submit nonencrypted from data : Enable
Userdata persistence : Enable
Scripting : All Enabled
User Authentication
Logon : Automatic logon only in Intranet zone

ShawnDev
November 12th, 2002, 12:17 PM
Do you have Host Scripting support installed on the computers that are having problems? If I remember correctly, scripting won't work (specficially, VBScript) if you don't.

ShawnDev
November 12th, 2002, 12:20 PM
Also, try moving the <script> tag into the <head> and then calling your code from the body onLoad event. It's been a long time since I've toyed with VBScript (seldom used any more, in my experience) but I'm not sure you can use it in-line in the HTML like that.

Bounty Bob
November 13th, 2002, 03:20 AM
Hi ShawnDev,

I sidestepped the problem in the end my rewriting my function as JavaScript. I had already tried moving the code into the <Head> section but to no avail. Really was quite bizzare. To the best of my knowledge, all the PC's had the same security settings, yet it only failed on one of them. Someone suggested IE/VBScript DLL might have become corrupted which seemed to be the only other possibility (one which I couldn't check because I only have Admin rights for my PC so can't install/reinstall software on anyone elses).

Cheers for the response anyway,

Rob

ShawnDev
November 13th, 2002, 10:10 PM
Glad you got it working.

Abandoning VBScript is always the right answer :D

(No, not really - don't send me hate mail. It's a joke, son.)