Javascript error in IE7 and IE8 when submitting AJAX form

I'm attempting to debug the AJAX form code (used to create an interest form on my site) and although it works, I'm consistently getting a syntax error in IE7 and IE8 (verified on Windows XP and Windows 7). This is particularly annoying in that it causes an unwarranted error dialog (intermittently, of course) to appear in front of my users. Not a great experience.

I'm stumped, however, as to what the cause of the error actually is. I've narrowed it down to where the data option is getting set in the ajax call, and it seems to be related to the Campaign Monitor URL that needs to be accessed by the form. Encoding the url fixes the error, but then the form fails to get submitted.

It's worth nothing that I'm using jQuery 1.4.3 and jQuery UI 1.8.5. Downgrading removes the JS error (well, this one), but causes many more, and I'm hesitant to go down the path of attempting to debug (and retest) all of those unless I know for absolute certain that that is the only possible solution.

Any help would be greatly appreciated.

Here's the code:

      errorClass: "fieldWithErrors",
      validClass: "valid",
      highlight: function(element, errorClass, validClass) {
      unhighlight: function(element, errorClass, validClass) {
      submitHandler: function() {
        var formAction = $("#myForm").attr("action"); // here's where the trouble starts
        var id = "my_id";
        var emailId = id + "-" + id;
        var str = $("#myForm").serialize();

        // Add form action to end of serialized data
        // CDATA is used to avoid validation errors
        var serialized = str + "&action=" + formAction;
        // ]]>

          url: "http://my.tld/path_to/proxy.php",
          type: "POST",
          data: serialized, // this seems to be the problem line
          success: function(data) {
          // Server-side validation
          if ( != -1) {
          $("#formErrorMsg").html("<div class='error content'><h4>Please correct the following errors:</h4><p style='text-align: left'>You must enter a valid email address to be added to the interest list.</p>");
          $("#formErrorMsg").css('display', 'block');
        else {
          $("#formErrorMsg").css('display', 'none');

See why 200,000 companies worldwide love Campaign Monitor.

From Australia to Zimbabwe, and everywhere in between, companies count on Campaign Monitor for email campaigns that boost the bottom line.

Get started for free