View Full Version : VBScript & JAVAScipt

10-23-2003, 10:50 PM
I am a beginner in ASP, i like to ask that whether i can code my page with both scripts that is VB and JAVA scripts...

This is because i am using VBscripts to connect my database and i like to manipulate the checkboxes with JAVAscripts....Is it possible, or there is some other way that VBscripts manipulate the checkboxes?

10-23-2003, 11:10 PM
You can also use VBscript for the clientside manipulation of your formfields, but i never met someone that actually uses VBscript for clinetside coding ...

Javascript is fine for clientside actions. It will behave just the same as when inserted in a hardcoded page.
You can include it like you include regular html : response.write it or go out of asp mode.
some asp code
some javascript
<%some more asp-code %>

The javascript is then sent to the clinet, and for him it will look the same as a regular html file.

You can also use Jscript as scriptinglanguage inside asp (so for the serverside code)

10-23-2003, 11:21 PM
thanks for your advise...
i will try it later....

10-23-2003, 11:25 PM
You're welcome.

By the way : welcome to the forums!

10-29-2003, 04:01 AM
I also agree with raf - use VBScript for server-side coding (at least with ASP), but NEVER use it for client-side scripting, that's what JavaScript is for. VBScript only works client-side for Internet Explorer, so it should be avoided in that case whenever possible.

JavaScript (or JScript) can also be used server-side with ASP, but generally VbScript is the way to go there since it's much more commonly used, and there's more support for it. However if you're comfortable with it go for it. I sometimes use JavaScript server-side in place of VBScript since it's quicker for me to write in certain cases.