November 3rd, 2005, 10:09 AM
Permission denied: 'MsgBox'
I want to create an onClick event that displays the user with a prompt to let them know that they're leaving a secure site. The prompy will have a Yes/No option. The error says:
"Permission denied: 'MsgBox'"
Below is my code:
Any one know how to fix this?
warning = MsgBox("You will be leaving the secure site." & Chr(13) & Chr(10) & "Continue anyway?",4, "WARNING!!!")
<a href="http://www.bma.org.uk/ap.nsf/Content/accesshealthrecords" target="_blank" onClick="<% Response.Write(warning) %>">http://www.bma.org.uk/ap.nsf/Content/accesshealthrecords</a>
November 3rd, 2005, 12:16 PM
Your code is trying to do a msgbox on the server, is that what you intended?
Bartender to Rene Descartes "have another beer?" Descartes: "I think not" and he vanished.
November 3rd, 2005, 12:32 PM
John - you can't raise messageboxes from the server to the client (at least not in this way). You can express script to the client, but not call messagebox.
November 4th, 2005, 04:06 AM
November 10th, 2005, 06:11 AM
Use a Confirm box