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

1:

Using external javascript files with asp.net MVC
Aren't you supposed to append the form to body before you must submit it? Not sure how it works in Chrome without that, although try doing any thing 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\USERASP.NET MVC download image rather than display in browser

2:

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, although I would did this without creating a form. How to remove the link if value is 0 using asp.net mvcYou must just use $.ajax or $.post and build the required URL with Url.Action(...), then call document.reload()..


95 out of 100 based on 50 user ratings 405 reviews

@