I've noticed that if you try and run (not edit) a Javascript file, instead of going to edit. It will come up with an error. This error normally sounds like it is missing a reference (your code, not the program running your code). I getting stuff like this:

Script: \h0700sdc01\home$\etc.

Line: 3 Char: 1

Error: 'document' is undefined'

Code: 800A1391

Source: Microsoft JScript runtime error

Is this normal? If it doesn't error, then it does nothing. My question is, is it trying to execute it like a program (similar to VBScript)?

link|improve this question

feedback

1 Answer

up vote 1 down vote accepted

If the javascript has references to the HTML document object model (DOM), then you will have problems running it like it is a VBScript. This is because the script is designed to perform operations on an HTML document within a web browser.

link|improve this answer
Are you implying that JavaScript can be run on its own? Can I run it as a separate program? If so, could you provide me with a reference on the subject (more in depth details)? Just points for now :) – Xander Lamkins Apr 28 '11 at 17:59
It would be possible to run javascript on it's own, however you will have to refer to Microsoft's documentation on what all javascript can/cannot do/access in the OS. Most of my familiarity with javascript is within web pages. – Justin Pearce Apr 28 '11 at 18:01
Ok, thanks :) I deem this question... ANSWERED! – Xander Lamkins Apr 28 '11 at 18:20
feedback

Your Answer

 
or
required, but never shown

Not the answer you're looking for? Browse other questions tagged or ask your own question.