This question is asked fairly regularly. Really, it comes down to preference. If you come from a VB or VBA background, VBScript would probably be the logical choice. If you're already familiar with JScript on the client side, or have a strong background in C, C++ or Java, then it's the language you should use. However, if you anticipate asking or looking for help with code issues, that might tip the scales back to VBScript. This is because most samples you'll find online, and most people hanging around the newsgroups to help you, deal with VBScript. In any case, here is my short list of pros for each language:
VBScript- functionality previously missing (eval, execute) now in v5
- more intuitive object creation / destruction
- outside of MSDN, most samples and help are geared to VBScript
JScript- code reuse (since most of you will be writing client-side JScript)
- array has built-in sort method, which has proven useful to me at least
For those planning large, high-traffic sites, you might want to take into account that each language is proficient at certain things. So, if performance is an issue, you should consider that:
- Peter Hanus discovered that VBScript is faster in almost all operations except pattern-matching and bit-shifting (these results are published in an article on ASPToday.com, which charges for access).
- In another article, greyMagic software goes to great lengths to show that, in their experiments, JScript is faster.
Personally, I prefer VBScript. I like its more English-like syntax, its error handling, and collection enumeration. I don't recall ever using both languages in the same page, though I do have a few pages in a recent application that are written completely in JScript (one such page puts a list of files from a folder into an array, sorts them into alphabetical order, and returns them to an application). To be completely sold on VBScript, you may just have to buy a ridiculously overpriced subscription to ASPToday.com.