| ||||||||||
![]() |
Shopping cart software Solutions for online shops and malls | |||||||||
![]() |
![]() |
|
X-Cart Home | ![]() |
![]() |
![]() |
![]() |
![]() |
![]() |
Using ajax calls in template - 403 Forbidden Error | |||
![]() |
|
|
Thread Tools | Search this Thread |
#1
|
|||||||||
|
|||||||||
![]() I am trying to use Ajax to pass some data to php file from template.
In template in javascript: Code:
When I test it, I get this error in console: Code:
I tried to add: Code:
in ajaxtest.php but still no luck... How do I make it work?
__________________
Version 4.7.6 X-cart Gold |
|||||||||
#2
|
|||||||||
|
|||||||||
![]() Usually, you don't call the modules directory directly in a script. Try placing your ajaxtest.php in the root directory.
__________________
Mike White - Now Accepting new clients and projects! Work with the best, get a US based development team for just $125 an hour. Call 1-502-773-6454, email mike at babymonkeystudios.com, or skype b8bym0nkey XcartGuru X-cart Tutorials | X-cart 5 Tutorials Check out the responsive template for X-cart. |
|||||||||
#3
|
|||||||||
|
|||||||||
![]() This error is probably because /modules/.htaccess has "deny from all". Don't circumvent this security but call a php file outside of this directory.
Off the top of my head you may want to start with one of the Block examples like:
|
|||||||||
#4
|
|||||||||
|
|||||||||
![]() Quote:
Moving ajaxtest.php to root solved the problem! Thanks a lot, sir! Quote:
Thanks for these references, already found some good bits there!
__________________
Version 4.7.6 X-cart Gold |
|||||||||
|
|
|||
X-Cart forums © 2001-2020
|