I don't know anything about javascript really but I managed to hack out a script that shows/hides text from a database.
It changes the display:none part of a div, to either show or hide an external php page called by xmlhttp and put in to the <div> with innerHTML. I noticed that if I put a sleep() pause in the external php page, the JS will show what was already in the <div>.
Is it ok to put a preloader gif in the <div> so it will show, if the external page is slow to load?
The external php page output replaces the <img> when the script is run.
It changes the display:none part of a div, to either show or hide an external php page called by xmlhttp and put in to the <div> with innerHTML. I noticed that if I put a sleep() pause in the external php page, the JS will show what was already in the <div>.
Is it ok to put a preloader gif in the <div> so it will show, if the external page is slow to load?
PHP:
<div id="28" style="display:none;"><img src="loading.gif" /></div>
The external php page output replaces the <img> when the script is run.