JS Function from PHP file loaded via AJAX
Posted: Sun Oct 26, 2008 11:39 am
Hello again,
Maybe it's a bit strange what I'm traying to do here but here it goes. I want to call a JS function in a php file that has been loaded via ajax.
I have the index.php where I load the ajax.js scrip.
When I click on Link1 the file1.php is loaded via AJAX in DIV1.
file1.php make an insert in a mysql db, then makes a select then echoes "Done".
At the end it also tryies to call the loadcontent function to load file2.php in DIV2, but nothing happens.
No error, nothing. Is this because the loadcontent function doesn't exist in file1.php from where I try to call it?
If I open file1.php in a pop-up, not in DIV1, and then call the function with window.opener it works.
Please help!
Thanks,
Andrei
Maybe it's a bit strange what I'm traying to do here but here it goes. I want to call a JS function in a php file that has been loaded via ajax.
I have the index.php where I load the ajax.js scrip.
When I click on Link1 the file1.php is loaded via AJAX in DIV1.
file1.php make an insert in a mysql db, then makes a select then echoes "Done".
At the end it also tryies to call the loadcontent function to load file2.php in DIV2, but nothing happens.
No error, nothing. Is this because the loadcontent function doesn't exist in file1.php from where I try to call it?
If I open file1.php in a pop-up, not in DIV1, and then call the function with window.opener it works.
Please help!
Thanks,
Andrei