Question

I've got some HTML which has some dynamically generated forms which are submitted via a click handler using jQuery which doesn't seem to want to work in IE6. It works perfectly fine in Firefox and Chrome.

<form method="post" name="12860864" action="/Item/StepIn">
   <a class="picklistsubmitter" 
      href="javascript: void(0);" 
      tabindex="1" title="Lalal">
       <div class="pickitem stepIn">
           <div>1 ... 46</div>
           <input type="hidden" name="referenceId" 
                  value="GBR|0TOGBREQnaBwAAAAABAAEAAAAAJ0HTQAAAAAAAAP..AAAAAAD.....AAAAAAAAAAAAAA--">
           <input type="hidden" name="displayText" value="1 ... 46">
       </div>
   </a>
</form>

I then call a click handler after the AJAX (Or I did previously have this called by live)

$(".picklistsubmitter").click(function () {
    $(this).closest('form').trigger('submit');
});

When I trigger the handler (via AJAX), it goes into my StepIn function and then does a RedirectToAction("Search") at the end (Following RPG principles) This is followed by Firefox and Chrome but not any IE browser and I'm unsure why.

Anybody have any ideas what this could be? Am using ASP.Net MVC 3, JQuery 1.4 and JQuery Form (Latest version).

I'm wary I might not have specified all the information, but I'm hoping it's a common issue.

I can add some generated code from Chrome or Firefox if that is likely to help.

Regards, Jamie

[Edit] I've just ran through the code through W3C and it's pretty much standards complaint for XHTML Strict (with two exceptions), Note that debugging the UI in IE6 does send the right form details to the ASP.Net MVC 3 application but once it gets to a RedirectToAction("Search"), it looks like it's not following the 302 redirect.

[Further Edit]: Checked in Fiddler and in Firefox and Chrome, the 302 redirect is honoured, returning a 200 status code for the Search page, however for IE6 it seems it's not following any further.

#   Result  Protocol    Host    URL Body    Caching Content-Type    Process Comments    Custom  
278 302 HTTP    localhost:1954  /Item/StepIn    132 private     text/html; charset=utf-8    iexplore:10020  
Was it helpful?

Solution

It seems a return false; is needed after each submit() call.

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top