Timeline for Ajax not returning anything on form submit
Current License: CC BY-SA 3.0
6 events
when toggle format | what | by | license | comment | |
---|---|---|---|---|---|
Apr 20, 2015 at 20:37 | comment | added | cybmeta | @Zeeshan as I explained, having configured the Ajax request for a data type and retrieve another data type won't fix your problem. The mismatched data types doesn't make the Ajax call fail; the Ajax call is sent and the response is retrieved. Only when the data type retrieved need some kind of parsing and it can not be done jQuery will throw an exceptition making the Ajax request fail because of the parsing error; for example, when jQuery retrieves and invalid JSON object and try to parse it. But that situation is not your situation. Please, read my answer. | |
Apr 20, 2015 at 19:26 | comment | added | Zeeshan | Hello people ... I am confused here can anybody shared a solution ... I changed to text but still no result is returned. | |
Apr 20, 2015 at 17:29 | comment | added | cybmeta | Sorry, if the downvote didn't like to you but I think your answer is low quality and I explained why. If you think I'm wrong in the explanation, please tell me, I will appreciate it a lot. Sorry again if it didn't like to you. If I need to learn how to use up/downvotes, please tell me too, I will appreciate it as well. | |
Apr 20, 2015 at 17:19 | comment | added | Mark Kaplun | @cybmeta, please take your attitude and spend it on someone else, I ignored you before but your downvote is so comic I just could not ignore it now. Back to ignore mode. | |
Apr 20, 2015 at 17:04 | comment | added | cybmeta |
Test yourself changing the dataType argument of jQuery.post to text , or set the content type header of the responde to HTML; it won't fix the issue if the ajax actions are not moved outside the shortcode callback. Also, you must know that if the response returns a mismatched data type, you can have problems (or not, depending on the exact situation) when you try to work with the data but it doesn't make the ajax call to fail, at least when working with jQuery.
|
|
Apr 20, 2015 at 16:19 | history | answered | Mark Kaplun | CC BY-SA 3.0 |