To fetch/ display a page from your domain using Ajax, just call the below function:
ajaxpagefetcher.load("container_id", "pageurl_or_path",
bustcacheBool, [array_of_js_files], [array_of_css_files])
The parameters in that order are:
- The ID attribute of the DIV or some other container on the page that the
Ajax page should load inside
- The URL or relative path from the current page to the external page to
load. For the URL, it must be from the same domain as the current!
- A Boolean value (
true
or false
) specifying
whether the script should prevent the browser from caching the page after
it's been fetched for the 1st time. Set to true
if the external
page is dynamic and likely changes within the same browser session.
- An optional array that contains the paths to a list of external
.js files you wish to load at the same time, each separated by a comma if
multiple. For example:
["functions.js", "message.js"]
.
- An optional array that contains the paths to a list of external
.css files you wish to load at the same time, each separated by a comma if
multiple. For example:
["pagestyle.js"]