allelopath
asked on
Confirm -> OK
In the vb.net codebehind, I have this:
ClientScript.RegisterStartupScript(Me.GetType(),
"LocError",
"<script language='javascript'>if (confirm('Continue?')) {document.getElementById('Updates').value = 'true';}</script> ")
which displays a confirm dialog. I want it to set the value of the hidden field "Updates" if the user clicks OK. It is not working, however, the values is not being set. Is the javascript correct?
What type of Updates Form
ASKER
There is my problem. I need to submit the form after the hidden variable is set. I just tried this:
"<script language='javascript'> document.getElementById('txReceiptID').focus(); document.getElementById('txReceiptID').select(); document.forms.Form1.submit();</script> ")
but that leads to erratic behavior
ASKER CERTIFIED SOLUTION
membership
Create a free account to see this answer
Signing up is free and takes 30 seconds. No credit card required.