Internal Server Error Ajax Jquery
Contents |
here for a quick overview of the site Help Center Detailed answers to any questions you might have Meta Discuss the workings and policies of this site About Us Learn more about Stack
500 (internal Server Error) Ajax Get
Overflow the company Business Learn more about hiring developers or posting ads with us 500 internal server error ajax php Stack Overflow Questions Jobs Documentation Tags Users Badges Ask Question x Dismiss Join the Stack Overflow Community Stack Overflow is a
Jquery Ajax 500 Internal Server Error Php
community of 4.7 million programmers, just like you, helping each other. Join them; it only takes a minute: Sign up Debugging jQuery ajax 500 Internal server error up vote 6 down vote favorite 3 My working post 500 (internal server error) angularjs CodeIgniter site is giving a 500 Internal Server Error while hosting it on MediaTemple. It is happening during a jQuery Ajax call. I have no idea what could have gone wrong. Is the error from the controller or the model? My Ajax call: $.ajax({ url: "", type: 'POST', data: form_data, success: function(msg) { window.location.href = "" return true; }, error: function (xhr, ajaxOptions, thrownError) { alert(xhr.status); jquery ajax post 500 internal server error asp net alert(thrownError); alert(xhr.responseText); } }); xhr.responseText has returned me
The action you have requested is not allowed.
. But what does that mean? jquery ajax share|improve this question edited Jul 7 at 14:12 TylerH 11k63666 asked Mar 8 '13 at 0:11 Himanshu Yadav 4,3452486161 I don't understand why you have msg in success: function(msg) if you don't even use it in this function? Check if variable posted to/received from controller are of good type. –Iwo Kucharski Mar 8 '13 at 0:16 500 Means a server error, the problem is not with your jQuery code, the problem is with the server. –Benjamin Gruenbaum Mar 8 '13 at 0:20 @BenjaminGruenbaum Ok I understand that problem is with server code. But how I am going to debug it? –Himanshu Yadav Mar 8 '13 at 0:23 I think for this ajax call you use 'Post', while how did you implement you controller, does it accept 'Post' call or 'Get' call? and was the url mapped in your controller? –OQJF Mar 8 '13 at 0:36 add a comment| 3 Answers 3 active oldest votes up vote 32 down vote accepted You can try using alert(xhr.responseText); or console.log(xhr.responseText); (the later will show up in your browser console e.g. firebug) in yourhere for a quick overview of the site Help Center Detailed answers to any questions you might have Meta
Ajax Post 500 Internal Server Error C#
Discuss the workings and policies of this site About Us Learn ajax 500 medicine more about Stack Overflow the company Business Learn more about hiring developers or posting ads with us
500 (internal Server Error) Ajax Laravel
Stack Overflow Questions Jobs Documentation Tags Users Badges Ask Question x Dismiss Join the Stack Overflow Community Stack Overflow is a community of 4.7 million programmers, just like http://stackoverflow.com/questions/15284413/debugging-jquery-ajax-500-internal-server-error you, helping each other. Join them; it only takes a minute: Sign up Ajax - 500 Internal Server Error up vote 14 down vote favorite 3 I am trying to learn AJAX for this project at work. I have a site that loads medications that a patient is taking. I call this AJAX function up recursively so http://stackoverflow.com/questions/4789613/ajax-500-internal-server-error that it will append a new table containing a single medication and 7 days worth of history. I am having issues getting the code to execute in FF and IE. Works perfectly fine in chrome. I had alerts displaying the xmlhttp.status and this is what i got... xmlhttp.status==500 (internal server error). I commented out all of my recursion so it is narrowed down to this tid bit of code. ( x keeps track of the number of meds so i know when to stop) function LoadMeds() if ( x == MaxMedCount ) { document.getElementById("the_day").value = parseInt(document.getElementById("the_day").value)+7; } if ( x == (MaxMedCount - 1) ) { document.getElementById("x").value = x + 1; show(); } else { if (window.XMLHttpRequest) {// code for IE7+, Firefox, Chrome, Opera, Safari xmlhttp=new XMLHttpRequest(); } else {// code for IE6, IE5 xmlhttp=new ActiveXObject("Microsoft.XMLHTTP"); } xmlhttp.onreadystatechange=function() { try { if (xmlhttp.readyState==4 && xmlhttp.status==200) { var div = document.createElement('div'); div.innerHTML= xmlhttp.responseText; document.getElementById('MedTable').appendChild(div); document.getElementById("the_med_").value = the_med_; } } catch(e) { alert("Error"); } } xmlhttp.open("GET","URL with variables passed",true); xmlhttp.sen
here for a quick overview of the site Help Center Detailed answers to any questions http://stackoverflow.com/questions/37640121/500-internal-server-error-due-to-jquery-ajax-post you might have Meta Discuss the workings and policies of this site About Us Learn more about Stack Overflow the company Business Learn more about hiring developers https://forum.jquery.com/topic/get-method-returns-500-internal-server-error or posting ads with us Stack Overflow Questions Jobs Documentation Tags Users Badges Ask Question x Dismiss Join the Stack Overflow Community Stack Overflow is a community internal server of 4.7 million programmers, just like you, helping each other. Join them; it only takes a minute: Sign up 500 Internal Server Error due to JQuery Ajax Post up vote 1 down vote favorite 1 Found the answer: The error was the semicolon and it worked ! But as "KIKO Software pointed out" internal server error due the code that didn't make sense the data was added twice in the database hence I removed the "$("script").html(result);" line in the html file and everything worked like a charm. And this was nothing related to server error 500.... Just a few errors in the code. I am stuck while trying to perform an AJAX post. For some reason, I'm getting a server 500 error. I can see it hit break points in the controller. I tried alerting and echo from the PHP file, and it doesn't work. I tried looking at other stack overflow queries and it didn't help. The Ajax call in add_pet.html script function add_trigger(){ var name=$('#name').text(); var breed=$('#breed').text(); $.ajax({ type: "POST", url: "add_pet.php", data: "PET_NAME="+name+"&PET_BREED="+breed, cache: false, success: function(result) { $("script").html(result); window.location.href='view.html'; } }); } $('div[contenteditable]').keydown(function(e) { if (e.keyCode === 13) { add_trigger(); return false; } });