|
|
|
| |||||||||
|
|
«
Previous Thread
|
Next Thread
»
|
Thread Tools | Search this Thread | Rate Thread | Display Modes |
|
|
|
Stop making mediocre tutorials.The best tutorials are video! Camtasia Studio makes it easy to create engaging, buzz-building screen videos at any size, in any popular format. Download the free trial!
|
|
#1
|
||||
|
||||
|
JavaScript or VBScript for form checking ?
In order to make sure that people enter proper data in a HTML form I often use JavaScript triggered by the OnSubmit command. However, the same things could be dealt by VBScript in a form handling page, which sends the user back to the form page if the data are not of the expected format.
As things stand I think JavaScript is the better tool to handle the data, but that's just my personal opinion. What's the opinion of web designers out there ? |
|
#2
|
||||
|
||||
|
Well I am off the same opinion. Javascript would be better in this situation, at least for me because of several reasons. It is a simpler code in JavaScript and I think that the VBscript equivalent has some browser issues, but I'm not 100% sure on that.
But in the end, it all depends on what kind of web site you have, what other scripts you have on it etc. The script you use for this might conflict with another script you wish to apply in the future and a change would have to take place. What other scripts do you have on your web site? - Moridin Last edited by Moridin : June 15th, 2006 at 05:01 PM. Reason: fixed typo |
|
#3
|
||||
|
||||
|
i tend to stick to javascript for client side and vbscript for server side
haven't had any conflicts so far, but then again, i tend to favour the KISS philosophy |
|
#4
|
||||
|
||||
|
I tend to agree with the general consensus here. Javascript is better for client-side scripting because it is generally more compatible across browsers and the code of often simpler.
To be honest, I don't even use VBScript for server-side programming unless I'm making use of ActiveX controls. Outside of that, it just depends on which one you're more comfortable in programming. |
| Viewing: Dev Shed Forums > Web Site Management > Scripts > JavaScript or VBScript for form checking ? |
| Thread Tools | Search this Thread |
| Display Modes | Rate This Thread |
|
|
|
|