Click to See Complete Forum and Search --> : Calling a VBscript function


Mac Senour
June 5th, 2000, 11:56 PM
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

June 6th, 2000, 06:22 PM
<INPUT onclick="ShowMessage()"TYPE="submit" NAME="Enter" value="Submit Query"></FORM>
<SCRIPT LANGUAGE=vbscript>

</SCRIPT>

June 6th, 2000, 06:24 PM
<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>