New Zenner
- Join Date:
- Aug 2015
- Posts:
- 63
- Plugin Contributions:
- 0
Post #1 by roberth
Sorry if this is in the wrong forum – essentially the problem I have has to do with appearance changing aspects, though there are function changes as well.
I have a function that is using $("#divID").load(ajax.php...) to execute a change in the page based on which product the user clicked to initiate the function. The buttons related to this function for each product have ```html
onclick="javascript: loadFunction(...)
When the request for "ajax.php" is sent (the file is in site root httpdocs/) it returns page_not_found.html because of this line in "init_sanitize.php":
if ((! isset ( $_SESSION ['securityToken'] ) || ! isset ( $_POST ['securityToken'] )) || ($_SESSION ['securityToken'] !== $_POST ['securityToken']))
{
zen_redirect ( zen_href_link ( FILENAME_PAGE_NOT_FOUND, '', $request_type ) );
}
If I comment out ```
zen_redirect ( zen_href_link ( FILENAME_PAGE_NOT_FOUND, '', $request_type ) );
``` then the load is successful and everything happens correctly. How can I make it so that the "ajax.php" file is allowed to .load() through this 'securityToken' statement?
Thanks!
---
P.S. I am working from a comparison module found [here](https://www.zen-cart.com/showthread.php?180977-Compare-multiple-products-support-thread) that I have modified the functionality and structure of for my own site. This particular issue was brought up in the support thread with the same pseudo-solution I found (commenting the redirect out) but like the module author, I think this is too drastic a measure to take. So I'm just wondering how to get the file that it's trying to load to pass 'securityToken' instead of just not allowing any redirects at all.