Jump to content

Ajax request not detecting on cPanel Server


ankur0101

Recommended Posts

Hi,

I have a code which detects whether it is an ajax request or any guest is directly visiting URL.

I am using following code for building ajax request.

 

 

xmlhttp.open("GET","http://aims.cmcs/ajax/fetch_fees_structure/"+dept.value+"/"+str,true);
xmlhttp.setRequestHeader('X_Requested_With', 'XMLHttpRequest');
xmlhttp.send();
 

It works perfectly (on localhost) as,

1. While user is working in app, he get those all ajax things.

2. But when any guest goes to http://aims.cmcs/ajax/fetch_fees_structure/MS, it shows error which I have defined.

 

But when I put this on cPanel server, it shows error while accessing in my app

1. user using app get that error which a guest would see while directly opening URL.

 

I am using Codeigniter. CI got inbuilt ready function for that. Problem is things are not working on cPanel server and working on my localhost.

 

I am confused as I think there is not need to tweak PHP or any other server settings as this is client side thing.

Please help me.

 

Thanks.

  • 4 weeks later...

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.