Jquery .ajax() Issue October 21, 2023 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 JugaExtending Userstory Model With A Custom Field Fails With "compile Function Not Found"Dynamically Create Object Keys In Ie 11 (expected Identifier, String Or Number, Not A Comma Issue)Add Custom Drop Down Menu In Highcharts/highstockCode 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 postsRender Any Response From Ajax Call (HTML And/or JS)JSON Data Through JS/AJAX Into PHPHow To Read Live Streaming Data Using AJAXPassing An Array Of Javascript Classes To A MVC Controller? Post a Comment for "Jquery .ajax() Issue"
Post a Comment for "Jquery .ajax() Issue"