0

I was trying out the jQTouch demos on my localhost. I couldn't get any response after clicking on "Submit". I Googled the problem and only found this link text but it doesn't work.

James
  • 2,014
  • 2
  • 25
  • 33
p0larBoy
  • 1,244
  • 5
  • 14
  • 23

2 Answers2

2

Just remember to add the ajax file(such as ajax_post.php) in the .htaccess file. Cheers!

RewriteCond $1 !^(index\.php|javascript|**ajax_post\.php**|robots\.txt|captcha)
p0larBoy
  • 1,244
  • 5
  • 14
  • 23
0

The same-origin policy prevents localhost AJAX requests since the domains of the request and the response are different. To workaround this, use the IP Address, disable the policy, or add the Access-Control-Allow-Origin: * header to the response.

Community
  • 1
  • 1
Paul Sweatte
  • 22,871
  • 7
  • 116
  • 244