Hi! I have a page that contains a regular table, the data of the first column of the table is known and written in the source code of the page. The 2nd column needs data to be loaded from net (from another site)... Reading these data from a remote server may takes long time... because of that I want that the page is printed then start retreive remote data and add them to the page after finish receiving.
I tried this:
The code is work but the same problem, the page didn't load before the whole remote data retreived! how to make the page loads (printed) and then call that doload() php function?Code:<script> window.onload = function (){ <?php function doload(){ $remotedata = readfromsite("http://mysite.com/myfile.txt"); echo "document.getElementById('mydiv').innerHTML = '".$remotedata."';"; } doload(); ?> } </script>
Thank's




Reply With Quote