OK, this is what I have for my testing purposes:
ASP.net project with a button and a checkbox on it. in the code behind form load I have:
Button1.Attributes.Add("onclick", "vbscript
:confirm_delete()")
Here is the vbscript code:
Function validMe()
if form1.CheckBox1.Checked = False then
validMe = False
Else
validMe= True
End if
End Function
What I would like to happen is the button1_click event in the code behind page not to fire if the return is FALSE. I can get it to work in JavaScript just fine, I need to get it to work in Vbscript.
Thanks,
Jim
"Trevor Benedict R" <tr********@yahoo.com> wrote in message news:%2****************@TK2MSFTNGP09.phx.gbl...
See if this code helps. All you have to do is structure your client side
script.
<html>
<body>
<button OnClick="Click1()">Click Me</button>
</body>
<script Language="VBScript">
Function Click1()
IF FuncYes Then
Msgbox "Returns True"
Else
Msgbox "Returns False"
End If
If FuncNo Then
Msgbox "Returns True"
Else
Msgbox "Returns False"
End If
End Function
Function FuncYes()
FuncYes = True
End Function
Function FuncNo()
FuncNo = False
End Function
</script>
</html>
Regards,
Trevor Benedict R
MCSD
*** Sent via Devdex http://www.devdex.com ***
Don't just participate in USENET...get rewarded for it!