Jquery .ajax() Issue January 15, 2024 Post a Comment I am using Jquery 1.7.1 and am having issues.. I'm working with a CRM in my script and am working to get the page finished but I'm stuck with this issue.. my html: Solution 1: Here are some suggestions that might help you find the error:In your ajax call, after the success, add the following code:success: function(response) { alert(response); }, error: function(response) { console.log(response.status + " " + response.statusText); } CopyThat will print in your console a clue to what is causing this error.By the way, there are some other suggestions, your validations can be achieved with the new HTML5 input types (email, phone), if you have to maintain compatibility with browsers that don't support these, you can find a jQuery plugin that handles this. Solution 2: Do you make an cross domain ajax request ? I downloaded your code and make a simple test:Code in localhost:8080/domain1/a.phpMake a ajax request tolocalhost:8080/domain2/b.phpError happensBaca JugaRails: Not Ember, Not Js Responses, But Something In-betweenReference Asp.net Control By Id In Javascript?Can Jquery.validate Plugin Prevent Submission Of An Ajax FormCode in localhost:8080/domain1/a.php Make a ajax request to the page itself(localhost:8080/domain1/a.php)No error happens and get the expected response.Then I googled the answer for [jquery.ajax cross domain request],and find some links may helps: jQuery AJAX cross domain Soluation is : dataType: 'JSONP'$.ajax({ url:"testserver.php", dataType: 'JSONP', // Notice! JSONP <-- Psuccess:function(json){ // do stuff with json (in this case an array)alert("Success"); }, error:function(){ alert("Error"); }, }); CopySolution 3: I'm not sure about using $(this).serialize(). Have you tried using $('.collector').serialize() (or whichever the form is) since inside the ajax request the context may change. It's just a quick guess, hope it helps.Solution 4: The same thing happened to me.And I used the same version of JQuery (1.7.1) And the weirdest thing is that after adding "asyn:false ",it worked out. I guess this might be a bug of JQuery. Share You may like these postsMonitoring A Server-side Process On Rails Application Using Ajax XmlhttprequestOpenid And Facebook Authentication In Webapp Running On LocalhostQuery Database With Ajax And Classic AspAjax Too Slow - Recursion Post a Comment for "Jquery .ajax() Issue"
Post a Comment for "Jquery .ajax() Issue"