K
Kathy Burke
I'm trying to use the following code to use a javascript return confirm.
Cancel would exit the sub and return the page to its history (-2).
OK would proceed with the asp.net code, i.e., run the Complete() sub.
This is within a page that will take me quite a while to test, so I'd
like to know if I've got this right beforehand. I think I'm missing
something...but not sure what? Never used this before in this way.
...within a Sub...
If varTestStatus = "F" Then
RegisterClientScriptBlock("ConfirmTestFail", "<script
language='javascript'>return confirm(""Click Cancel to
return to the instruction page.\n\nOR...click OK to
continue running this code."");self.history.go(-2);
</script>")
'if Cancel clicked
Complete()
End If
TIA!
Kathy
Cancel would exit the sub and return the page to its history (-2).
OK would proceed with the asp.net code, i.e., run the Complete() sub.
This is within a page that will take me quite a while to test, so I'd
like to know if I've got this right beforehand. I think I'm missing
something...but not sure what? Never used this before in this way.
...within a Sub...
If varTestStatus = "F" Then
RegisterClientScriptBlock("ConfirmTestFail", "<script
language='javascript'>return confirm(""Click Cancel to
return to the instruction page.\n\nOR...click OK to
continue running this code."");self.history.go(-2);
</script>")
'if Cancel clicked
Complete()
End If
TIA!
Kathy