|
-
February 21st, 2000, 07:23 AM
#1
VBScript - Click Handler For Button On Form
On an HTML page, how exactly do I add a click handler for a button on a form? In Java it's
<INPUT TYPE="submit" NAME="btnSave" VALUE="Save" onClick=OnClickBtnSave>
I want a subroutine to be called before the form does its POST thing.
Or, can the form's ACTION be set to call a subroutine instead of going to an URL or script?
-
February 21st, 2000, 07:50 AM
#2
Re: VBScript - Click Handler For Button On Form
this is how I usually do it.
<form onsubmit="return(myscript());">
Function myscript
if document.myform.myfield.value = "" then
msgbox "fill this field"
myscript = False ' do NOT submit
exit function
end if
myscript = True ' submit the form
end function
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|