Hi Everyone.
I've created some vbscript that allows the user to input comments before they continue. The code is as follows...
Function ConfirmAuth(pageID)
Dim Comments,Msg,Title,theLocation
Msg = "Please enter any comments in the field below and click OK to submit this page for authorisation, otherwise click Cancel."
Title = "Submit for Authorisation"
Comments = InputBox(Msg,Title)
theLocation = "authorise.cfm?pageID=" & pageID & ""&comments="" & Comments
If Comments > "" Then location.replace(theLocation)
End Function
This work ok, but if the user doesn't enter a comment it doesn't do the location.replace part. I added the If statement so that if they clicked the cancel button it work not do the location.replace. As not entering anything in the text box and pressing cancel return the same, "", is there another way to detect which button, ok or cancel, the user pressed.
Thanks.
Andrew.
I've created some vbscript that allows the user to input comments before they continue. The code is as follows...
Function ConfirmAuth(pageID)
Dim Comments,Msg,Title,theLocation
Msg = "Please enter any comments in the field below and click OK to submit this page for authorisation, otherwise click Cancel."
Title = "Submit for Authorisation"
Comments = InputBox(Msg,Title)
theLocation = "authorise.cfm?pageID=" & pageID & ""&comments="" & Comments
If Comments > "" Then location.replace(theLocation)
End Function
This work ok, but if the user doesn't enter a comment it doesn't do the location.replace part. I added the If statement so that if they clicked the cancel button it work not do the location.replace. As not entering anything in the text box and pressing cancel return the same, "", is there another way to detect which button, ok or cancel, the user pressed.
Thanks.
Andrew.