By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
440,160 Members | 1,983 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 440,160 IT Pros & Developers. It's quick & easy.

Client & Server side scripting

P: n/a
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

Mar 16 '07 #1
Share this Question
Share on Google+
1 Reply


P: n/a
"Chris" <c.******@swansea.ac.ukwrote:
>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)
Sl********@bls.gov
http://members.cox.net/slatteryt
Mar 16 '07 #2

This discussion thread is closed

Replies have been disabled for this discussion.