daily pastebin goal
69%
SHARE
TWEET

Untitled

a guest Aug 10th, 2018 57 Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. jQuery, ajax request doesn't success with JSON on IE
  2. $.ajax({
  3.         url: 'js/jquery.desobbcode.json',
  4.         dataType: 'json',
  5.         cache: false,
  6.         success: function(json) {
  7.             alert('ok');
  8.         },
  9.         error: function(xhr, errorString, exception) {
  10.             alert("xhr.status="+xhr.status+" error="+errorString+" exception="+exception);
  11.         }
  12.     });
  13.    
  14. xhr.status=200
  15. error=parsererror
  16. exception=SyntaxError Unterminated string constant
  17.    
  18. $.ajax({
  19.     url: 'js/jquery.desobbcode.json',
  20.     dataType: 'json',
  21.     contentType: "application/json; charset=utf-8",
  22.     ...
  23. });
  24.    
  25. $.ajax({
  26.     url: 'js/jquery.desobbcode.json',
  27.     dataType: 'json',
  28.     contentType: "application/json; charset=utf-8",
  29.     data: {}
  30.     ...
  31. });
  32.    
  33. {"inputButton":[{"id":"desoBBCode_bold","value":"Gras","tag":"b"},{"id":"desoBBCode_italic","value":"Italique","tag":"i"},{"id":"desoBBCode_underline","value":"Souligné","tag":"u"},{"id":"desoBBCode_image","value":"Image","tag":"img"},{"id":"desoBBCode_link","value":"Lien","tag":"url"},{"id":"desoBBCode_quote","value":"Citation","tag":"quote"}],"selectTextSize":[{"text":"Taille","value":""},{"text":"Trèstrèspetit","value":"1"},{"text":"Trèspetit","value":"2"},{"text":"Petit","value":"3"},{"text":"Gros","value":"4"},{"text":"Trèsgros","value":"5"},{"text":"Trèstrèsgros","value":"6"}],"selectTextColor":[{"text":"Couleur","value":"a"},{"text":"Rouge","value":"red"},{"text":"Bleu","value":"blue"},{"text":"Vert","value":"green"}]}
RAW Paste Data
We use cookies for various purposes including analytics. By continuing to use Pastebin, you agree to our use of cookies as described in the Cookies Policy. OK, I Understand
 
Top