Put very simply, the problem is that javascript scripts work only if I'm viewing a website (or any page from a server). It won't work if I'm viewing a page locally.
Does anyone have any idea about this?
Printable View
Put very simply, the problem is that javascript scripts work only if I'm viewing a website (or any page from a server). It won't work if I'm viewing a page locally.
Does anyone have any idea about this?
That's wierd!
Have you checked the HTML path to the .JS or .CLASS files in your index.htm(L) ?
It could be still looking for it via the web, which usually wouldn't really be a problem...
Some HTML pages check which page the file was called from (HTTP_Referer), and if you're calling it locally, the HTML would fail automatically... and not due to an error.
Regards,
Paul.
You sure you're not load an external JS file something like "/files/file.js" so it's looking in the wrong place?
EDIT: Oops sorry that's what VisionIT said, sorry :o
No, what I mean is, any html file... the javascript part just won't work. Even something as simple as:
Javascript just doesn't work locally at all.Code:<html>
<head>
<title>blah</title>
</head>
<body onLoad="javascript:alert('hello');">
adlkfjalfjas;lfjaflj
</body>
</html>
Now what are these .js and .class files you refer to? There are no external files involved here.
Could it be a DLL problem? I don't know much about them.
there isn't suppose to be a space between "java script". Change that and it should work
The space gets put in there itself when I'm posting that code.Quote:
Originally posted by OrdinaryGuy
there isn't suppose to be a space between "java script". Change that and it should work
Yash... it's not a problem of coding. I'm talking about any javascript. ANY javascript in ANY html file, it won't execute locally.
Using IE, right? Check your security setting for Trusted Sites or Local Intranet or whatever zone IE puts the local filesystem into for disabled scripting.
Quickest option...
Download the new JavaSDK from MS.
Regards,
Paul.
Mendhak, can you run JScript thru WSH (or ASP if you have IIS installed)?
eh? Didn't understand that...Quote:
Originally posted by JoshT
Mendhak, can you run JScript thru WSH (or ASP if you have IIS installed)?
I can run Javascript only when viewing a web page from the server. So this means instead of C:/inetpub/wwwroot/index.html, I have to do http://localhost/index.html for the javascript to work... I have PWS.