Not sure if I am being totally wrong here but I want to do something like this:
- Have an external js page (on an external server)
- Include the page - OK that is easy etc...
- Have a Jquery function on the external page - well actually many functions
- Call those functions directly onto the page.
All a bit like this:
External js page:
$(document).ready(function() {
function testit() {
$('#test').load('page.php');
}
function testit_1() {
$('#test_1').load('page_1.php');
}
function testit_1() {
$('#test_2').load('page_2.php');
}
});
Then on the actual page just call:
<script type="script/javascript">
testit();
</script>
<div id="test"></div>
Am I wrong or should that not work?
<div id="test"></div>. Are you saying that, within page.php, there is code to run testit_1, and on page_2.php to run testit_2?