is it possible to call vbs file with js?

Discussion in 'Javascript' started by rgintexas, May 19, 2006.

  1. rgintexas

    rgintexas Guest

    i'm trying to get server side vbscript to execute in firefox:

    </script>
    <script type="text/VBScript" src="VBFile.vbs">
    </script>

    is there any way i can use javascript to call the vbs file, or is there
    any other method for getting server side vbscript to execute within
    firefox?
    rgintexas, May 19, 2006
    #1
    1. Advertising

  2. rgintexas

    VK Guest

    rgintexas wrote:
    > i'm trying to get server side vbscript to execute in firefox:
    >
    > </script>
    > <script type="text/VBScript" src="VBFile.vbs">
    > </script>
    >
    > is there any way i can use javascript to call the vbs file, or is there
    > any other method for getting server side vbscript to execute within
    > firefox?


    Firefox doesn't support VBScript (nor any other browser except IE). You
    can use an ajaxoid to address your server side script as a regular URI
    and get the execution results in response:
    ....
    xmlhttp.open('GET','myServerSide.asp',true);
    ....
    VK, May 19, 2006
    #2
    1. Advertising

  3. rgintexas

    Randy Webb Guest

    VK said the following on 5/19/2006 2:32 AM:
    > rgintexas wrote:
    >> i'm trying to get server side vbscript to execute in firefox:
    >>
    >> </script>
    >> <script type="text/VBScript" src="VBFile.vbs">
    >> </script>
    >>
    >> is there any way i can use javascript to call the vbs file, or is there
    >> any other method for getting server side vbscript to execute within
    >> firefox?

    >
    > Firefox doesn't support VBScript (nor any other browser except IE).


    You missed the important part of the question though. "getting server
    side script to execute in firefox" and the answer is quite simple.
    Server side code will *never* execute in the browser. It doesn't matter
    what language it is.

    If VBFile.vbs generates JS code, you simple change the type attribute to
    text/javascript:

    <script type="text/javascript" src="VBFile.vbs">

    > You can use an ajaxoid to address your server side script as a regular URI
    > and get the execution results in response:


    I would ask you what you think an "ajaxoid" is but your explanation
    might give me a headache.

    --
    Randy
    comp.lang.javascript FAQ - http://jibbering.com/faq & newsgroup weekly
    Javascript Best Practices - http://www.JavascriptToolbox.com/bestpractices/
    Randy Webb, May 19, 2006
    #3
  4. rgintexas

    VK Guest

    Randy Webb wrote:
    > I would ask you what you think an "ajaxoid" is but your explanation
    > might give me a headache.


    "ajaxoid" is a lexical compromise between "AJAX" (so be beat down for
    using "stupid bizwords") and "IXMLHTTPRequest/XMLHttpRequest solution"
    (so loosing skin on my finger tips by typing it).

    If you have a better variant, I'm open for proposals. :)
    VK, May 19, 2006
    #4
  5. rgintexas

    Randy Webb Guest

    VK said the following on 5/19/2006 3:33 AM:
    > Randy Webb wrote:
    >> I would ask you what you think an "ajaxoid" is but your explanation
    >> might give me a headache.

    >
    > "ajaxoid" is a lexical compromise between "AJAX" (so be beat down for
    > using "stupid bizwords") and "IXMLHTTPRequest/XMLHttpRequest solution"
    > (so loosing skin on my finger tips by typing it).
    >
    > If you have a better variant, I'm open for proposals. :)
    >


    "Unreliable technology pushed by boardroom pundits"

    --
    Randy
    comp.lang.javascript FAQ - http://jibbering.com/faq & newsgroup weekly
    Javascript Best Practices - http://www.JavascriptToolbox.com/bestpractices/
    Randy Webb, May 19, 2006
    #5
  6. rgintexas

    VK Guest

    Randy Webb wrote:
    > VK said the following on 5/19/2006 3:33 AM:
    > > Randy Webb wrote:
    > >> I would ask you what you think an "ajaxoid" is but your explanation
    > >> might give me a headache.

    > >
    > > "ajaxoid" is a lexical compromise between "AJAX" (so be beat down for
    > > using "stupid bizwords") and "IXMLHTTPRequest/XMLHttpRequest solution"
    > > (so loosing skin on my finger tips by typing it).
    > >
    > > If you have a better variant, I'm open for proposals. :)
    > >

    >
    > "Unreliable technology pushed by boardroom pundits"


    Only as an acronym then: UTPbBU, otherwise no better than
    "IXMLHTTPRequest/XMLHttpRequest solution" :)
    VK, May 19, 2006
    #6
  7. rgintexas

    Erwin Moller Guest

    Randy Webb wrote:

    > VK said the following on 5/19/2006 3:33 AM:
    >> Randy Webb wrote:
    >>> I would ask you what you think an "ajaxoid" is but your explanation
    >>> might give me a headache.

    >>
    >> "ajaxoid" is a lexical compromise between "AJAX" (so be beat down for
    >> using "stupid bizwords") and "IXMLHTTPRequest/XMLHttpRequest solution"
    >> (so loosing skin on my finger tips by typing it).
    >>
    >> If you have a better variant, I'm open for proposals. :)
    >>

    >
    > "Unreliable technology pushed by boardroom pundits"
    >


    Hi Randy,

    You just made me very curious: Why do you call AJAX unreliable?

    I've just implemented a few AJAX-based solutions at some customers, which
    work 100% so far, so your remark gives me the creeps. :-/

    What is wrong with AJAX at the moment?


    Regards,
    Erwin Moller
    Erwin Moller, May 19, 2006
    #7
  8. rgintexas

    Randy Webb Guest

    Erwin Moller said the following on 5/19/2006 8:32 AM:
    > Randy Webb wrote:
    >
    >> VK said the following on 5/19/2006 3:33 AM:
    >>> Randy Webb wrote:
    >>>> I would ask you what you think an "ajaxoid" is but your explanation
    >>>> might give me a headache.
    >>> "ajaxoid" is a lexical compromise between "AJAX" (so be beat down for
    >>> using "stupid bizwords") and "IXMLHTTPRequest/XMLHttpRequest solution"
    >>> (so loosing skin on my finger tips by typing it).
    >>>
    >>> If you have a better variant, I'm open for proposals. :)
    >>>

    >> "Unreliable technology pushed by boardroom pundits"
    >>

    >
    > Hi Randy,
    >
    > You just made me very curious: Why do you call AJAX unreliable?


    Lack of wide spread support. It is gaining support in MAC browsers but
    it has a long way to go before I would consider it reliable enough for
    an Internet site.

    > I've just implemented a few AJAX-based solutions at some customers, which
    > work 100% so far, so your remark gives me the creeps. :-/
    >
    > What is wrong with AJAX at the moment?


    Lack of wide spread support mostly. Especially when a more reliable
    approach works.
    --
    Randy
    comp.lang.javascript FAQ - http://jibbering.com/faq & newsgroup weekly
    Javascript Best Practices - http://www.JavascriptToolbox.com/bestpractices/
    Randy Webb, May 19, 2006
    #8
  9. rgintexas

    Roman Ziak Guest

    Randy Webb wrote:
    > You missed the important part of the question though. "getting server
    > side script to execute in firefox" and the answer is quite simple.
    > Server side code will *never* execute in the browser. It doesn't matter
    > what language it is.


    This is slightly off the original topic: if server-side was running
    JavaScript (or other language supported by both sides), scripts could be
    shared between server and client (e.g. parsers, validators, HTML forms
    generators, etc). Only restriction would be that shared code would not
    use environment specific features, e.g. server variables or window
    object. Some specific features could be abstracted, e.g. the same script
    could make HTTP requests either from server or from client and parsing
    responses afterwards.

    Roman
    Roman Ziak, May 20, 2006
    #9
  10. rgintexas

    Randy Webb Guest

    Roman Ziak said the following on 5/20/2006 7:53 AM:
    > Randy Webb wrote:
    >> You missed the important part of the question though. "getting server
    >> side script to execute in firefox" and the answer is quite simple.
    >> Server side code will *never* execute in the browser. It doesn't matter
    >> what language it is.

    >
    > This is slightly off the original topic: if server-side was running
    > JavaScript (or other language supported by both sides), scripts could be
    > shared between server and client (e.g. parsers, validators, HTML forms
    > generators, etc).


    They can share the same code text, yes. But they won't share the same
    script block.

    > Only restriction would be that shared code would not use environment
    > specific features, e.g. server variables or window object.


    I don't see any benefit to that kind of generic code.

    > Some specific features could be abstracted, e.g. the same script
    > could make HTTP requests either from server or from client and parsing
    > responses afterwards.


    It wouldn't be the same script block, it may be the same script text but
    you can't have a script that executes in either place. If it is marked
    to execute on the server, then the client shouldn't ever see it. If it
    is marked for the client, then the server won't execute it.

    --
    Randy
    comp.lang.javascript FAQ - http://jibbering.com/faq & newsgroup weekly
    Javascript Best Practices - http://www.JavascriptToolbox.com/bestpractices/
    Randy Webb, May 20, 2006
    #10
  11. Erwin Moller wrote:

    > What is wrong with AJAX at the moment?


    Besides of being used a (commercial) buzzword, often without regard to its
    actual meaning and history: ActiveX support is required for "AJAX" to work
    in IE. Furthermore, many (incompetent) people implement "AJAX" and do not
    think about clean degradation, for cases where "AJAX" support is not
    available, anymore, because it "works" (for them). See also Prototype,
    which is really the last piece of code junk but widely implemented anyway
    for "AJAX" functionality. Then those people start wondering why their
    stuff does not work in IE below version 6 or without ActiveX support or
    in $notThatWidelyDistributedUserAgent.


    PointedEars
    --
    #define QUESTION ((bb) || !(bb))
    // William Shakespeare (if he would have been a hacker ;-))
    Thomas 'PointedEars' Lahn, May 25, 2006
    #11
  12. rgintexas

    Roman Ziak Guest

    Randy Webb wrote:
    > Roman Ziak said the following on 5/20/2006 7:53 AM:
    >> Randy Webb wrote:
    >>> You missed the important part of the question though. "getting server
    >>> side script to execute in firefox" and the answer is quite simple.
    >>> Server side code will *never* execute in the browser. It doesn't matter
    >>> what language it is.

    >>
    >> This is slightly off the original topic: if server-side was running
    >> JavaScript (or other language supported by both sides), scripts could be
    >> shared between server and client (e.g. parsers, validators, HTML forms
    >> generators, etc).

    >
    > They can share the same code text, yes. But they won't share the same
    > script block.
    >
    >> Only restriction would be that shared code would not use environment
    >> specific features, e.g. server variables or window object.

    >
    > I don't see any benefit to that kind of generic code.


    Example: server side script "prints" HTML into the network stream,
    client side script "prints" the HTML into the document object. One could
    abstract the "print()" function and use the same script to render
    widgets in browser *or* on the server if browser does not run JS.

    >
    >> Some specific features could be abstracted, e.g. the same script
    >> could make HTTP requests either from server or from client and parsing
    >> responses afterwards.

    >
    > It wouldn't be the same script block, it may be the same script text but
    > you can't have a script that executes in either place. If it is marked
    > to execute on the server, then the client shouldn't ever see it. If it
    > is marked for the client, then the server won't execute it.
    >


    That's right, cannot be the same block and client will not see the block
    marked for the server. However, both blocks can include same external JS
    file.
    Roman Ziak, May 25, 2006
    #12
    1. Advertising

Want to reply to this thread or ask your own question?

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. Brad

    Running a VBS file from ASP.NET

    Brad, Aug 28, 2003, in forum: ASP .Net
    Replies:
    0
    Views:
    512
  2. Alex
    Replies:
    1
    Views:
    2,613
    Alvin Bruney [MVP]
    Feb 16, 2004
  3. =?Utf-8?B?a2lt?=
    Replies:
    3
    Views:
    7,557
    cbDevelopment
    Dec 15, 2005
  4. Stef Mientki
    Replies:
    1
    Views:
    421
    alex23
    Nov 27, 2008
  5. Leo
    Replies:
    13
    Views:
    191
    Roland Hall
    Oct 22, 2005
Loading...

Share This Page