Submitting email works in Firefox, returns "invalid" in IE

In Firefox, when I enter a valid email address and submit, I am taken to the confirmation page, and the email address is added to my submissions list.

In IE, when I enter a valid email address and submit, I am taken to a page that says, "Sorry, but the email address you supplied was invalid and needs to be fixed," and the email address is not added to my submissions list.

I am using the C/Send email submission form with a few small changes, and NO changes to the input names.

How do I get the form to work in IE?

====== HTML form =========

<form name="emailForm" action="http://journeygroup.csend.com/t/r/s/mnid/" method="post">
    <div>
        <label for="name">Name:</label><br />
        <input type="text" name="cm-name" id="name" class="textField normalText"/><br />
        <label for="mnid-mnid">Email:</label><br />
        <input type="text" name="cm-mnid-mnid" id="mnid-mnid" class="textField normalText"/><br />
        <label for="ZIP">ZIP:</label><br />
        <input type="text" name="cm-f-dtod" id="ZIP" class="textField normalText zipField floatLeft"/>

        <!-- <input type="submit" value="Subscribe Now!" class="submitButton floatRight" /> -->
                       
        <a href="#" class="submitButton floatRight" onclick="formSubmit();">Subscribe Now!</a>
                       
        <br class="clear" />
    </div>
</form>

======== JAVASCRIPT ==========

<script language="JavaScript" type="text/javascript">
/**
* Email validation script.
* Thank you:
* http://www.smartwebby.com/dhtml/
* http://developer.apple.com/internet/webcontent/validation.html
*/

function echeck(str) {

        var emailFilter=/^.+@.+\..{2,6}$/
        if (!(emailFilter.test(str)))
        {
            alert("Please enter a valid email address.");
            return false
        }
       
        var illegalChars= /[\(\)\<\>\,\;\:\\\/\"\[\]]/
        if (str.match(illegalChars))
        {
            error = "The email address contains illegal characters.";
            return false
        }
           
        return true                   
    }

function ValidateForm(emailID){
   
    if ((emailID.value==null)||(emailID.value=="")){
        alert("Please Enter your Email ID")
        emailID.focus()
        return false
    }
    if (echeck(emailID.value)==false){
        emailID.value=""
        emailID.focus()
        return false
    }
    return true
}


function formSubmit()
{
    var emailField = "cm-mnid-mnid";
    var emailID=document.emailForm[emailField] //Email address
   
    if (ValidateForm(emailID)==true)
    {
        document.forms["emailForm"].submit();
    }
    else
    {
    }
}
</script>

adamm, 7 years ago

There is one other important thing: when I submit the form from IE, it goes directly to http://journeygroup.csend.com/t/r/s/mnid/ but it does NOT immediately display the error message; it says the page cannot be found. I have to refresh the page to get the error message.

adamm, 7 years ago

Oops! I figured out the problem. The confirmation page was not getting found, and for some reason, in IE, the error showed up at http://journeygroup.csend.com/t/r/s/mnid/ instead of the confirmation page is was forwarding to. It's working now.

Join 200,000 companies around the world that use Campaign Monitor to run email marketing campaigns that deliver results for their business.

Get started for free
1-888-533-8098