November 3rd, 2005, 11: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, 01:16 PM
Your code is trying to do a msgbox on the server, is that what you intended?
I've never been able to appreciate the sublime arrogance of folks who feel they were put on earth just to save other folks from themselves .." - Donald Hamilton
November 3rd, 2005, 01: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, 05:06 AM
November 10th, 2005, 07:11 AM
Use a Confirm box