1. Computer problem? Tech Support Guy is completely free -- paid for by advertisers and donations. Click here to join today! If you're new to Tech Support Guy, we highly recommend that you visit our Guide for New Members.

javascript object problem

Discussion in 'Software Development' started by ggordie, Aug 20, 2005.

Thread Status:
Not open for further replies.
Advertisement
  1. ggordie

    ggordie Thread Starter

    Joined:
    Jul 16, 2005
    Messages:
    143
    i'm trying to script a greeting that will execute on my computer on startup. the problem is, i dont know what object to use, because i'm not linking the js file to an html file, i'm executing it just as a js file because i dont a window opening as well as a popup.

    here's my code:

    Code:
    document.alert("welcome gordie")
    when i try to execute it i get a pop up saying:

    thanks alot!
     
  2. Shadow2531

    Shadow2531

    Joined:
    Apr 30, 2001
    Messages:
    2,636
    Like this?

    WScript.Echo("Welcome Gordie");
     
  3. brendandonhu

    brendandonhu

    Joined:
    Jul 8, 2002
    Messages:
    14,681
    You're not opening it in an HTML document, hence there is no "document" object to reference. The WScript.echo thing should work fine, assuming you have Windows Scripting Host enabled.
     
  4. ggordie

    ggordie Thread Starter

    Joined:
    Jul 16, 2005
    Messages:
    143
    so basically WScript replaces document... otherthan that, can i use normal javascript?
     
  5. brendandonhu

    brendandonhu

    Joined:
    Jul 8, 2002
    Messages:
    14,681
  6. ggordie

    ggordie Thread Starter

    Joined:
    Jul 16, 2005
    Messages:
    143
    thanks a lot!
     
  7. Sponsor

As Seen On
As Seen On...

Welcome to Tech Support Guy!

Are you looking for the solution to your computer problem? Join our site today to ask your question. This site is completely free -- paid for by advertisers and donations.

If you're not already familiar with forums, watch our Welcome Guide to get started.

Join over 733,556 other people just like you!

Loading...
Thread Status:
Not open for further replies.

Short URL to this thread: https://techguy.org/392139

  1. This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
    By continuing to use this site, you are consenting to our use of cookies.
    Dismiss Notice