jQuery .submit() woes with IE8

jQuery .submit() woes with IE8

I am trying to submit a delete link click via a http post to my asp.net mvc controller. While my code below works for chrome it does not work in IE8. Any pointer will be very useful.

Setup:- Browser: IE8 jQuery: 1.4.1 MVC: 2.0

The delete link is:-

<a title="Delete contact" href="/Contacts/Delete/<%= Model.Contact.Id %>" class="delete" rel="Are you sure you want to delete <%= Html.Encode(Model.Contact.Name) %>?">Delete</a> 

and the jqeury handler for the click of delete is

$("a.delete").click(function() { if (confirm($(this).attr("rel"))) {     var form = "<form method='POST' action='" + $(this).attr("href") + '" style='display:none;'></form>";         $(form).submit();     }     return false; }); 

Extension method not working if I set controller property in Action, works in OnExecuting


Using external javascript files with asp.net MVC
Aren't you supposed to append the form to body before you can submit it? Not sure how it works in Chrome without that, but try doing something like this-.
how to give image path in java script in asp.net mvc
$('<form/>', {     action: "...",     method: "...",     style: "...", }) .appendTo("body") .submit(); 

User.Identity.Name returning NT AUTHORITY\NETWORK SERVICE i want Domain\USER

ASP.NET MVC download image rather than display in browser


Why does this render as a list of “System.Web.Mvc.SelectListItem”s?
IE does not submit disabled elements in a form, so maybe it's the same with empty forms..
Can I use the <%: tag on an application that will be hosted on IIS6?
It's not exactly a solution, but I would do that without creating a form.

How to remove the link if value is 0 using asp.net mvc
You can just use $.ajax or $.post and build the required URL with Url.Action(...), then call document.reload()..

65 out of 100 based on 60 user ratings 1135 reviews