Jquery Ajax working on localhost (xammp) but not working on Server (cpanel)?
Jquery Ajax working fine on localhost (xammp) but not working on Server (cpanel) !
also ajax with Javascript working fine , but throught JQuery it has problem ! (on server) i changed send method to POST but problem same.
this is my website : concert20.ir
an this is js code:
var arr=[];
- function func1(id,status){
- var str;
- var a=id.split('-');
- // a[0] = chair number
- // a[1] = singer id
- // a[2] = place
- length=arr.length;
- if(status=='رزور شده')
- {
- // check that who resereved it?
- var index=jQuery.inArray(parseInt(a[0]), arr);
- if(index>=0)
- {
- // unreserved ...
- //arr[index]=-1;
- arr.splice(index, 1);
- length=arr.length;
- $.ajax({
- url: 'ServerReply.php',
- type: "GET",
- data: ({reservefunc:0,chairnum:a[0],singerid:a[1],place:a[2]}),
- success: function(result){
- $("#drawtable").html(result);
- }
- });
- if(length==0)
- {
- $.ajax({
- url: 'ServerReply.php',
- type: "GET",
- data: ({showdetails:0,chairnum:arr,singerid:a[1],place:a[2]}),
- success: function(result){
- $("#card").html(result);
- }
- });
- }
- else
- {
- $.ajax({
- url: 'ServerReply.php',
- type: "GET",
- data: ({showdetails:1,chairnum:arr,singerid:a[1],place:a[2]}),
- success: function(result){
- $("#card").html(result);
- }
- });
- }
- }
- }
- else if(status=='قابل خرید')
- {
- // reserve ...
- arr.push(parseInt(a[0]));
- $.ajax({
- url: 'ServerReply.php',
- type: "GET",
- data: ({reservefunc:1,chairnum:a[0],singerid:a[1],place:a[2]}),
- success: function(result){
- $("#drawtable").html(result);
- }
- });
- sts=$("input#checksts").val();
- if(sts==-1)
- {
- var index=jQuery.inArray(parseInt(a[0]), arr);
- arr.splice(index, 1);
- alert('این صندلی قبلا خریداری شده است');
- }
- length=arr.length;
- if(length==0)
- {
- $.ajax({
- url: 'ServerReply.php',
- type: "GET",
- data: ({showdetails:0,chairnum:arr,singerid:a[1],place:a[2]}),
- success: function(result){
- $("#card").html(result);
- }
- });
- }
- else
- {
- $.ajax({
- url: 'ServerReply.php',
- type: "GET",
- data: ({showdetails:1,chairnum:arr,singerid:a[1],place:a[2]}),
- success: function(result){
- $("#card").html(result);
- }
- });
- }
- }
- }