SitePoint Sponsor

User Tag List

Results 1 to 20 of 20

Hybrid View

  1. #1
    SitePoint Member
    Join Date
    Dec 2000
    Posts
    9
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Standalone JavaScript

    Can JavaScript be used by itself without using HTML or any other scripting? In other words, can it be used like Java, C++, or Visual Basic to create a program?

  2. #2
    SitePoint Guru
    Join Date
    Sep 1999
    Location
    Singapore
    Posts
    854
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Yes, in a manner. Check out the Microsoft Windows Script Host. You can do quite a lot with it, but no substitute for a "real" programming language.

  3. #3
    SitePoint Addict
    Join Date
    May 2000
    Posts
    313
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    I believe you must have HTML inorder to use JavaScript. I don't think the Microsoft windows script host is JavaScript.

  4. #4
    SitePoint Guru
    Join Date
    Sep 1999
    Location
    Singapore
    Posts
    854
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    The WSH ships with VBScript and JScript engines.

    Anyway I have a WSH white paper, if anybody is interested in it I could email it to you.

  5. #5
    SitePoint Wizard silver trophy Jeremy W.'s Avatar
    Join Date
    Jun 2001
    Location
    Toronto, Canada
    Posts
    9,121
    Mentioned
    2 Post(s)
    Tagged
    0 Thread(s)
    JS can be used within html, called from flash or database apps, used within html or used server side with Netscape's web server.
    SVP Marketing, SoCast SRM
    Personal blog: Strategerize
    Twitter: @jeremywright

  6. #6
    SitePoint Guru
    Join Date
    Sep 1999
    Location
    Singapore
    Posts
    854
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Hmm, if you want to get into server side scripting, you can also use JScript with ASP.

  7. #7
    You talkin to me? Anarchos's Avatar
    Join Date
    Oct 2000
    Location
    Austin, TX
    Posts
    1,438
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    You can write Apache modules in js as well.

  8. #8
    SitePoint Zealot
    Join Date
    Mar 2001
    Location
    Los Angeles
    Posts
    100
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    I may be wrong, but doesn't JScript support all the language element of JavaScript?
    bsacks
    http://www.middlepeak.com

  9. #9
    SitePoint Wizard silver trophy Jeremy W.'s Avatar
    Join Date
    Jun 2001
    Location
    Toronto, Canada
    Posts
    9,121
    Mentioned
    2 Post(s)
    Tagged
    0 Thread(s)
    JScript is, essentially, server side javascript. It's MS's module which IS supported by IE but which is really only used server side (within asp) and contains all of javascript with a few "extras" for calling external objects and such.

    This is my understanding, but I've never worked with it so maybe someone else can illuminate here
    SVP Marketing, SoCast SRM
    Personal blog: Strategerize
    Twitter: @jeremywright

  10. #10
    SitePoint Guru
    Join Date
    Sep 1999
    Location
    Singapore
    Posts
    854
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Originally posted by bsacks
    I may be wrong, but doesn't JScript support all the language element of JavaScript?
    Nobody's claimed otherwise.

  11. #11
    SitePoint Guru
    Join Date
    Sep 1999
    Location
    Singapore
    Posts
    854
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Originally posted by studiococo
    JScript is, essentially, server side javascript. It's MS's module which IS supported by IE but which is really only used server side (within asp) and contains all of javascript with a few "extras" for calling external objects and such.
    Actually, JScript is just Microsoft's implementation of Javascript, or ECMAscript. Doesn't indicate if its client-side or server-side.
    Last edited by duckie; Jun 18, 2001 at 11:29.

  12. #12
    SitePoint Zealot
    Join Date
    Mar 2001
    Location
    Los Angeles
    Posts
    100
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Yes, So the point is;
    You can use JScript with WSH which means that if you know JavaScript you should be able to write stand alone scripts to run in a windows environment.
    bsacks
    http://www.middlepeak.com

  13. #13
    SitePoint Wizard silver trophy Jeremy W.'s Avatar
    Join Date
    Jun 2001
    Location
    Toronto, Canada
    Posts
    9,121
    Mentioned
    2 Post(s)
    Tagged
    0 Thread(s)
    duckie, I understand that it was MS's version of js (ecma) however since then it has been relegated to server side as no browser but IE supports it and even then, check which script ms.com uses
    SVP Marketing, SoCast SRM
    Personal blog: Strategerize
    Twitter: @jeremywright

  14. #14
    SitePoint Member
    Join Date
    Dec 2000
    Posts
    9
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Wow! I am suprised that this question has drawn so much discussion. Thanks for the quick responses.

    After reading the Windows Script Host white paper that duckie mentions, I have concluded that JavaScript can be used on a standalone machine without HTML, but it is limited. It can be used for things like logon scripts, etc. that require no user interface. There is not provision in JavaScript to create a GUI environment like there is in Visual Basic and other languages. That is what HTML does. It creates the user interface and JavaScript provides any extra functionality needed. So there is a use for JavaScript without HTML, but it is not fully functional like most languages.

    If there is an error in my conclusion, please respond and let me know. I would also suggest you read the WSH white paper. It is interesting.

  15. #15
    SitePoint Guru
    Join Date
    Sep 1999
    Location
    Singapore
    Posts
    854
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Originally posted by studiococo
    duckie, I understand that it was MS's version of js (ecma) however since then it has been relegated to server side as no browser but IE supports it and even then, check which script ms.com uses
    Actually the same scripting engine is used in IE, ASP and WSH. That engine is called the JScript engine. More a marketing label than anything else I think.

  16. #16
    SitePoint Wizard silver trophy Jeremy W.'s Avatar
    Join Date
    Jun 2001
    Location
    Toronto, Canada
    Posts
    9,121
    Mentioned
    2 Post(s)
    Tagged
    0 Thread(s)
    Yeah, that's what I said, isn't it? Or did I mistype?
    SVP Marketing, SoCast SRM
    Personal blog: Strategerize
    Twitter: @jeremywright

  17. #17
    SitePoint Guru
    Join Date
    Sep 1999
    Location
    Singapore
    Posts
    854
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Hmm, I got the impression you are trying to say that "JScript" is what is used on the server side. Maybe I didn't read carefully enough.

  18. #18
    SitePoint Wizard silver trophy Jeremy W.'s Avatar
    Join Date
    Jun 2001
    Location
    Toronto, Canada
    Posts
    9,121
    Mentioned
    2 Post(s)
    Tagged
    0 Thread(s)
    JScript is used client side on IE, server side in asp and netscape's server and inside wsh (which I haven't tried).

    The above is what I meant... am I wrong?
    SVP Marketing, SoCast SRM
    Personal blog: Strategerize
    Twitter: @jeremywright

  19. #19
    SitePoint Guru
    Join Date
    Sep 1999
    Location
    Singapore
    Posts
    854
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Like I said I think maybe its a simple case of me misunderstanding what you were trying to say.

    When you typed "it has been relegated to server side" I though you were trying to imply that JScript is used on the server side and the Javascript implementation in IE is known as something else, which of course, isn't what you actually meant.
    Last edited by duckie; Jun 19, 2001 at 09:37.

  20. #20
    SitePoint Wizard silver trophy Jeremy W.'s Avatar
    Join Date
    Jun 2001
    Location
    Toronto, Canada
    Posts
    9,121
    Mentioned
    2 Post(s)
    Tagged
    0 Thread(s)
    kk
    SVP Marketing, SoCast SRM
    Personal blog: Strategerize
    Twitter: @jeremywright


Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •