ajaxboy / cjax

Lightweight Ajax Framework built in PHP with no foot-print. Allows you to build ajax functionality with a single line of code & do so much more, right from the back-end!
http://cjax.sourceforge.net/
66 stars 27 forks source link

../cjax.js file not found error message #48

Closed frecervantes closed 3 years ago

frecervantes commented 3 years ago

Hi. need help installing Cjax. while I'm on it, i got this messages all the time in the browser.

Not Found The requested URL /AppServ/www/deliberiusSF/cjax/core/js/cjax.js was not found on this server. localhost//SITE?test/test2 -->the browser displays a blank page

SOLVED: just rename config.default.php to config.php and gave the $config->js_path in this file the path to the cjax.js file ('/mySite/cjax/core/js/').

but now FF says: Uncaught TypeError: jQuery.ajaxSetup is not a function at Object.CJAX_FRAMEWORK.onStartEvents [as fn] (cjax.js:4739) at :9:11 at r (cjax.js:4670) at :1:1

may you help?

Thanks.

HallofFamer commented 3 years ago

This error means you fail to include the jquery lib properly. You need to add a script tag for jquery:

<script src="https://code.jquery.com/jquery-3.6.0.min.js"
          integrity="sha256-/xUj+3OJU5yExlq6GSYGSHk7tPXikynS7ogEvDej/m4="
          crossorigin="anonymous">
</script>

Note you must include the entire JQuery, the slim version does not work. I had a similar problem earlier when I installed Bootstrap 4, turned out bootstrap uses JQuery slim by default and I had to change it to the full version so it would work with Cjax.

frecervantes commented 3 years ago

thanks HallofFamer