开发者

ajax jquery webhosting question

开发者 https://www.devze.com 2022-12-09 06:04 出处:网络
I have something weird going on here. I just finished 开发者_如何学Pythona site for a client and I uploaded and I can reach the site no problem. I have a tab on the site where you click a collapsing t

I have something weird going on here. I just finished 开发者_如何学Pythona site for a client and I uploaded and I can reach the site no problem. I have a tab on the site where you click a collapsing tree and click on a topic and it calls up an article from a db. On my local development platform (xampp vista) this works nicely but once I uploaded it to the site it does not do ajax and draw the content I am calling. what could be wrong? Does it have anything to do with the way I pointed the "url" directive of ajax cos I just gave it "controller/function" (I am using Codeigniter). is this the problem?


I would check the URLs being called. Check that you havent got hardcoded URLs (still refering to localhost) or errors in relative paths if they are not being resolved ie from errors whilst developing in Virtual Folders etc?


Did you develop the project in a subdirectory and after deployment have your clients' project in the web root? May be a RewriteBase/BaseUrl issue.

You could try FireBug (firefox plugin) and check/debug every ajax request.


The Obvious checks, which you've probably already made:

  1. The script that's actually making the database call, is it pointed to the correct database with the correct username and password?
  2. Did you make sure that the paths are all correct when you make the ajax call (check and debug the target script of the call?

The less obvious checks:

  1. There's a possibility that the ajax request is denied by the permissions set on your server. Try loading the path inside of another page (if you're using get, put the variables into the string, if you're using post, try posting synchronously with a test form).
  2. The database could be running slow, which could be throwing off something on your client-side that isn't "Waiting" for the request before doing something with it. Put some console checks in for firebug or ie developer and see if things are throwing blank values.

As usual, without code we're just kind of throwing spaghetti at the wall, but hopefully something sticks! : )

0

精彩评论

暂无评论...
验证码 换一张
取 消