Client & Server side scripting

C

Chris

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
 
T

Tim Slattery

Chris said:
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.
 

Ask a Question

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

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,744
Messages
2,569,482
Members
44,901
Latest member
Noble71S45

Latest Threads

Top