AJAX Net Page Fetcher

This AJAX playscript allows you make page read on other page's content (both asks to be from the same web site - avoid security issues) and show them on require inside the current user page. You can further assign any external .js or .css files that should be loaded at the same time as the external page, because AJAX fetched pages often will be not load these files correctly equally they come out within the page's source.




Over 2000+ free Javascript
at JavaScriptBank.com Website
Sampled by JavaScriptBank.com

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"]