Jump to content

What is the difference between VB script and Java script?

- - - - -

This topic has been archived. This means that you cannot reply to this topic.
8 replies to this topic

#1
newage123

newage123

    Newbie

  • Members
  • Pip
  • 1 posts
Which one is the better tool for client side validation? I am using java script .Can any one suggests which one is the better?
NJ website development
VISIT newagesmb.com

#2
morefood2001

morefood2001

    Speaks fluent binary

  • Members
  • PipPipPipPipPipPipPipPip
  • 1,720 posts
I am unfamiliar with any other types of client side validation.

However, why not use a server side validation and automatically fill in the forum on invalid submissions if you want a sleeker method?

#3
WingedPanther

WingedPanther

    A spammer's worst nightmare

  • Moderators
  • 16,831 posts
VBScript only runs under IE, which means over 20% of your potential visitors will not be able to run it. JavaScript runs under all modern browsers, though it requires some tweaking for IE. I don't know of any serious web-developers who use VBScript for client-side scripting.
Programming is a branch of mathematics.
My CodeCall Blog | My Personal Blog

#4
Xav

Xav

    Writes binary right handed and hex left handed

  • Members
  • PipPipPipPipPipPipPipPipPip
  • 13,118 posts

morefood2001 said:

However, why not use a server side validation and automatically fill in the forum on invalid submissions if you want a sleeker method?
Because server side validation is slower than client side validation. It has to be sent to the server to run, whilst the client-side validation can work locally.
Jordan said:

Good members, like yourself, stick around and post for ages to come!
Mr. Xav | Blog | Forums

#5
morefood2001

morefood2001

    Speaks fluent binary

  • Members
  • PipPipPipPipPipPipPipPip
  • 1,720 posts
Xav, that is true, it is much slower.

However I've found that with some sites, javascript doesn't quite work right (plus I suck at JS), so when I make a site, I want it to work with as many browsers as possible and make it as easy on myself as possible.

#6
WingedPanther

WingedPanther

    A spammer's worst nightmare

  • Moderators
  • 16,831 posts
Doing JS validation isn't that hard... it's just a matter of learning its quirks (and it DOES have some quirks). Testing it in FF and IE is usually enough, as that covers the two biggest flavors of JS, which is really more of a distinction on the DOM and Event objects.
Programming is a branch of mathematics.
My CodeCall Blog | My Personal Blog

#7
__ak

__ak

    Newbie

  • Members
  • PipPip
  • 24 posts
If you want to be able to control your visitors input, you should both do a clientside and a serverside validation.
The client side is only to make it easy for the visitor, serverside is the actually validation.

It's possible that the user turn off javascript in his/her browser, then only serverside would do any good.

:)

Edited by __ak, 14 November 2008 - 02:16 AM.


#8
WingedPanther

WingedPanther

    A spammer's worst nightmare

  • Moderators
  • 16,831 posts
You can also create a site so that if the user turns off javascript, they cannot submit a form. Whether this is a good or bad technique is up to you.
Programming is a branch of mathematics.
My CodeCall Blog | My Personal Blog

#9
Xav

Xav

    Writes binary right handed and hex left handed

  • Members
  • PipPipPipPipPipPipPipPipPip
  • 13,118 posts
<noscript>
Jordan said:

Good members, like yourself, stick around and post for ages to come!
Mr. Xav | Blog | Forums