Hello,
I have a script that when you click the submit button it opens outlook and sends an email. I have added a checkbox to the form, what I am trying to accomplish is if the checkbox is checked then run the open email function
here is what I have done so far
but my if statement does not seem to be working, I also tried to add the onclick to the submit
I have a script that when you click the submit button it opens outlook and sends an email. I have added a checkbox to the form, what I am trying to accomplish is if the checkbox is checked then run the open email function
here is what I have done so far
Code:
<input type="submit" onClick="openoutlook()" value="Insert Record" >
<script type=text/javascript>
<-- I added this if statement
if (document.form.rmacomplete.checked == true)
function openoutlook()
{
var L=document.form.CMNumber.value;
var S=document.form.company.value;
var B=document.form.email.value;
var M=document.form.credupdatedby.value;
var A= <% = Cdbl((rsGuestbook("ID")))%>
var url = '[URL unfurl="true"]http://mywebsite.com/a1/view.asp?id='[/URL] + escape(A);
self.location="mailto:someemail@mycompany.com?subject=?Record Number "+A+" Has Been Updated by "+M+" &body= Here is the link to the updated Record "+url+" The Reference is "+L ;
}
</script>
but my if statement does not seem to be working, I also tried to add the onclick to the submit