Client & Server side scripting

Discussion in 'ASP General' started by Chris, Mar 16, 2007.

  1. Chris

    Chris Guest

    Hi,

    I have jsut started to learn ASP development and have read many
    articles regarding which is the best to use regarding JavaScript or
    VBScript. All of the learning that I have done so far has been using
    VBScript.

    I have done the usual database connection and querying stuff using
    VBScript in my tutorials and have noticed that my code doesnt work
    when using Mozilla Firefox as VBScript is a Micorsoft language and
    will only work on IE.

    My first quaestion is as this is the case, what is the point in me
    learning VBScript as many people use other browsers other than IE thus
    rendering my code useless?

    Secondly, much of the information I have read when starting to learn
    talks about ASP javascript: run at client side and ASP vbscript: run
    at server side. Could someone please explain the difference to me
    plase?

    Many thanks,
    Chris
     
    Chris, Mar 16, 2007
    #1
    1. Advertising

  2. Chris

    Tim Slattery Guest

    "Chris" <> wrote:

    >Hi,
    >
    >I have jsut started to learn ASP development and have read many
    >articles regarding which is the best to use regarding JavaScript or
    >VBScript. All of the learning that I have done so far has been using
    >VBScript.
    >
    >I have done the usual database connection and querying stuff using
    >VBScript in my tutorials and have noticed that my code doesnt work
    >when using Mozilla Firefox as VBScript is a Micorsoft language and
    >will only work on IE.


    I think you're confusing client-side and server-side scripting. For
    client-side script, you should certainly use JavaScript, for exactly
    the reason you cite. If you use VBScript for your client-side script,
    only IE will be able to use it. Write it in JavaScript, and you hugely
    increase the odds that any browser will be able to run it.

    Server-side script is a different matter. The browser never sees it,
    does not have to deal with it, so it doesn't matter what language it's
    written in. ASP can handle code written either in JavaScript or
    VBScript. ASP is a Microsoft product, and VBScript is their baby. The
    result is that nearly all ASP examples are given in VBScript, nearly
    all ASP tutorials use VBScript, and nearly everybody that writes ASP
    code does so in VBScript.

    >Secondly, much of the information I have read when starting to learn
    >talks about ASP javascript: run at client side and ASP vbscript: run
    >at server side. Could someone please explain the difference to me
    >plase?


    Client-side code runs in the browser. It's used for dynamically
    hiding/showing parts of the page, checking fields in a form, making
    things happen on the page when the user presses a button, zillions of
    things

    Server-side script, like ASP script, runs on the server. It can access
    a database on the server, build pages dynamically. The result of
    running a server-side script is an HTML document - possibly including
    client-side script - that's sent to the user's browser.

    Note: ASP is a server-side scripting platform. The script can be
    written in JavaScript or VBScript (or, with the proper support, in
    several other languages). There is no such thing as ASP code that runs
    on the client.

    --
    Tim Slattery
    MS MVP(DTS)

    http://members.cox.net/slatteryt
     
    Tim Slattery, Mar 16, 2007
    #2
    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. Sumit
    Replies:
    1
    Views:
    325
    Rajesh.V
    Oct 16, 2003
  2. e
    Replies:
    2
    Views:
    414
    Charlie@CBFC
    Nov 21, 2003
  3. Mantorok
    Replies:
    9
    Views:
    436
    Eliyahu Goldin
    Jul 7, 2005
  4. Replies:
    0
    Views:
    445
  5. Kathryn
    Replies:
    9
    Views:
    210
    William Morris
    Oct 17, 2003
Loading...

Share This Page