Hello and welcome to our community! Is this your first visit?
Register
Enjoy an ad free experience by logging in. Not a member yet? Register.
Results 1 to 5 of 5
  1. #1
    New to the CF scene
    Join Date
    Oct 2003
    Location
    malaysia
    Posts
    5
    Thanks
    0
    Thanked 0 Times in 0 Posts

    VBScript & JAVAScipt

    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?

  • #2
    raf
    raf is offline
    Master Coder
    Join Date
    Jul 2002
    Posts
    6,589
    Thanks
    0
    Thanked 0 Times in 0 Posts
    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.
    Like
    <%
    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)

  • #3
    New to the CF scene
    Join Date
    Oct 2003
    Location
    malaysia
    Posts
    5
    Thanks
    0
    Thanked 0 Times in 0 Posts
    thanks for your advise...
    i will try it later....

  • #4
    raf
    raf is offline
    Master Coder
    Join Date
    Jul 2002
    Posts
    6,589
    Thanks
    0
    Thanked 0 Times in 0 Posts
    You're welcome.

    By the way : welcome to the forums!

  • #5
    Senior Coder
    Join Date
    Jun 2002
    Location
    41 8' 52" N -95 53' 31" W
    Posts
    3,660
    Thanks
    0
    Thanked 0 Times in 0 Posts
    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.
    Former ASP Forum Moderator - I'm back!

    If you can teach yourself how to learn, you can learn anything. ;)


  •  

    Posting Permissions

    • You may not post new threads
    • You may not post replies
    • You may not post attachments
    • You may not edit your posts
    •