Welcome Guest, Not a member yet? Register   Sign In
Ajax Controller
#2

(This post was last modified: 07-09-2015, 07:43 AM by ivantcholakov.)

At the beginning ot the head section of your HTML template you may place the following JavaScript:

Code:
<script type="text/javascript">
    //<![CDATA[
        var site_url = '<?php echo site_url(); ?>';
        // ... and so forth.
    //]]>
    </script>

The variable site_url will be available to the other JavaScripts within the page then, including your AJAX calls.
Reply


Messages In This Thread
Ajax Controller - by maxime59 - 07-09-2015, 04:46 AM
RE: Ajax Controller - by ivantcholakov - 07-09-2015, 07:42 AM
RE: Ajax Controller - by maxime59 - 07-09-2015, 10:32 AM
RE: Ajax Controller - by ivantcholakov - 07-09-2015, 11:50 AM
RE: Ajax Controller - by orionstar - 07-09-2015, 02:42 PM



Theme © iAndrew 2016 - Forum software by © MyBB