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?
It is a truism of American politics that no man who can win an election deserves to. --Trevanian, from the novel Shibumi
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.
"Any intelligent fool can make things bigger, more complex, and more violent. It takes a touch of genius -- and a lot of courage -- to move in the opposite direction." - A.Einstein
November 4th, 2005, 04:06 AM
November 10th, 2005, 06:11 AM
Use a Confirm box