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.

Link to comment
Share on other sites

  • 4 weeks later...
This thread is more than a year old. Please don't revive it unless you have something important to add.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • 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.