I'm dealing with this trouble: I have a page html that inside a "central" <div>
recall (include) a php page that do many stuffs.
In this page I have my search menu on left side, so normally would be loaded after "center column" <div>
fully loaded.
The include php page is quite slow, so that I would like the right side of the page is loaded before the central column.
This is what I did following many ideas I found on internet and on this site:
I've inserted an image in the footer part of the page with onload()
<img src="images/logo.jpg" alt="Logo" width="100%" height="150" id="footerLogo" onload="test()"/>
Then here is the script to "activate" php page:
<script language="javascript">
function test() {
$('#myDiv').fadeOut('slow').load('jobs-query.php').fadeIn("slow"); }
</script>
It works but I guess there are some problems because .load()
is different from include, so that when php page is loaded it doesn't get the data posted with the search form present on the right part of the page.
Is there a way to make JavaScript activate exactly PHP code as "include" or should I try something different?