First thing to check is: are you running the same version of jQuery local and on the server?
For example, the "@" in the [...@attribute]-style selector is deprecated (still works) in jQuery 1.2 but eliminated (doesn't work) in jQuery 1.3. What you describe is symptomatic of something version-related, so even though I don't see the use of "@" in your sample, maybe something similar is in-play here. **--** Steve On Aug 31, 2:56 pm, dasatan <jimmy...@gmail.com> wrote: > I found more thing, > when i change this > error: function(xhr) { > alert(xhr.status); > } > to > error: function(xhr,error) { > alert(xhr.status); > alert(error); > }, > the second alert gives me a parseerror > so i assume it should be something wrong with my json string, > but how come it works in my local but no on the server...... > > On 8月31日, 下午8時13分, dasatan <jimmy...@gmail.com> wrote: > > > hi all, > > I got an ajax code, when i run it in local it goes fine, but when i > > upload to server it always gets to error status > > i checked the status it does show 200, > > can anyone help me to fix this problem > > > $.ajax({ > > url: 'game_func.php?act=ioratio', > > dataType: "json", > > success: function(json) { > > if(json.callback == "done") > > { > > teamcon.value = json.newcon; > > document.getElementById("team1_io").value = > > json.newio1; > > document.getElementById("team2_io").value = > > json.newio2; > > }else{ > > if(json.value == "concede") > > { > > alert('球投輸入錯誤!!'); > > } > > } > > }, > > error: function(xhr) { > > alert(xhr.status); > > } > > }); > > > and this is the json string return > > > {"callback":"done","newcon":"2.5","newio1":"0.850","newio2":"0.850"} > > --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "jQuery Development" group. To post to this group, send email to jquery-dev@googlegroups.com To unsubscribe from this group, send email to jquery-dev+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/jquery-dev?hl=en -~----------~----~----~----~------~----~------~--~---