Is there a way, through Javascript, to capture the Internet Explorer security message response when submitting a form using the Mailto action.
I am doing this for a corporate intranet. All users are on IE 5.01 and using Outlook 2000 for e-mail. ASP pages or CGIs to capture the form data is not allowed. Client-side programming is the only option.
IE 5 will display a security message informing the user the form will be submitted using E-mail and their e-mail address will be revealed. Users need to click OK or Cancel on the message.
I wish to branch to a Thank You web page if users click OK or to a Form Cancelled web page if users click Cancel to the IE security message.
Javascript is:
function submitform(myform) { var userdata = document.dataform var recipient = "anyone@anywhere.com" var subject = "Comments Form"
validatedata(myform) var mailinfo = "mailto:" + recipient + "?subject=" + subject + "&body=" + myform.FormResponse.value;
myform.action = mailinfo;
//This is where I'm stuck If (myform.submit()) { location.href = "thanks.htm"} else { location.href = "thanks.htm"} }
function validatedata(form) { form.FormResponse.value = "\n\n"; . . . return true }
I have a button with an onclick action that branches to the submitform function.
Using the
if (myform(submit())
statement pauses execution of the script until the users clicks OK or Cancel on the IE security message, but the answer is always false.
Outlook 2000 processes the form data just fine. I would just like a way to send the users a message when they click on the Cancel button.
Is there a way to capture this message and achieve the results I’m looking for?