CodeGuru Home VC++ / MFC / C++ .NET / C# Visual Basic VB Forums Developer.com
Results 1 to 3 of 3
  1. #1
    Join Date
    Jun 2000
    Posts
    9

    Calling a VBscript function

    I'm trying to call a VBscript function with a button. I am trying to use onClick but it gives me a Javascript error when I try it. It seems to me that the program is looking for JavaScript and finding VBscript which makes the error.

    So how do I call a VBscript function in HTML using the onClick argument? I have several buttons and functions on the form, so I can't use the "onsubmit" argument.

    Thanks,
    Mac



  2. #2
    Guest

    Re: Calling a VBscript function

    <INPUT onclick="ShowMessage()"TYPE="submit" NAME="Enter" value="Submit Query"></FORM>
    <SCRIPT LANGUAGE=vbscript>

    </SCRIPT>



  3. #3
    Guest

    Re: Calling a VBscript function

    <INPUT onclick="ShowMessage()"TYPE="submit" NAME="Enter" value="Submit Query"></FORM>
    <SCRIPT LANGUAGE=vbscript>
    function ShowMessage ()
    'Code goes here
    msgbox ("This is a message")
    end function
    </SCRIPT>



Posting Permissions

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





Click Here to Expand Forum to Full Width

Featured