Take the 2-minute tour ×
Super User is a question and answer site for computer enthusiasts and power users. It's 100% free, no registration required.

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)?

share|improve this question

1 Answer 1

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.

share|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 :) –  Xan 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! –  Xan Apr 28 '11 at 18:20

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

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