ASP.NET MVC 3.0 jquery unobtrusive ajax Failed on IE 8

יום ראשון, אפריל 10, 2011

Hi All, I'v notice a strange behavior when working with ASP.NET MVC 3.0 jquery unobtrusive ajax on forms HTML element on IE (internet explorer) 8. Razor code example for generating ajax call on a form element using unobtrusive ajax: @using (Ajax.BeginForm("MyAction", "MyController",  new AjaxOptions { HttpMethod = "POST" })){ Sometimes (not always) i'm getting a javascript error with the message "Falied" that come from the javascript file jquery.unobtrusive-ajax.js: The line is: $("form :submit").live("click", function (evt) { Well the only solution I can find is to modify jquery.unobtrusive-ajax.js code with the following code: $("form").find("submit").live("click", function (evt) { This fix the javascript error and the ajax call works always on IE 8. Until...
one comment

Cross site Ajax plugin for Prototype

יום שלישי, דצמבר 2, 2008

Thierry Schellenbach has implemented a Prototype plugin that allows you to do cross site remoting using the dynamic script tag method that other frameworks such as Dojo and jQuery have supported for awhile.You can implement this by simply setting crossSite: true as a config parameter to Ajax.Request.Code example:new Ajax.Request('myurl', {method: 'GET',crossSite: true,parameters: Form.serialize(obj),onLoading: function() {//things to do at the start},onSuccess: function(transport) {//things to do when everything goes well},onFailure: function(transport) {//things to do when we encounter a failure}});the full information can be found on Thierry Schellenbach blog