ident Posted September 24, 2009 Share Posted September 24, 2009 what are the solutions for this. My problem is i have a picture displayed "uploading....." when a user clicks upload <div id = "mydiv" style="display:none"> <br /><center> <img src="uploading.png" /></center> </div> and this is called on click function showImage() { document.getElementById("mydiv").style.display="block"; } but if a user clicks back the image is stil there. what work arounds r there for this? Quote Link to comment Share on other sites More sharing options...
Farmgirl Posted September 24, 2009 Share Posted September 24, 2009 Should the style in your HTML not say display:hidden Quote Link to comment Share on other sites More sharing options...
gevans Posted September 24, 2009 Share Posted September 24, 2009 but if a user clicks back the image is stil there. what work arounds r there for this? Run a function on page load that hides the image. That was it will always be hidden when the page first loads. Should the style in your HTML not say display:hidden No, .some-class { display: none; visibility: hidden; } Quote Link to comment Share on other sites More sharing options...
ident Posted September 24, 2009 Author Share Posted September 24, 2009 back button does not call page load. The page is not loading. the page is cached. Quote Link to comment Share on other sites More sharing options...
haku Posted September 25, 2009 Share Posted September 25, 2009 If you are on an apache server, you can set that page to not cache in your .htaccess file. Quote Link to comment Share on other sites More sharing options...
ident Posted September 25, 2009 Author Share Posted September 25, 2009 Hi, i found this code <?php header('Cache-Control: no-cache, no-store, max-age=0, must-revalidate'); header('Expires: Mon, 12 Jul 1996 04:11:00 GMT'); //Any date passed. header('Pragma: no-cache'); ?> is there any way to send it other then the header? as keep getting warning header already sent Quote Link to comment Share on other sites More sharing options...
haku Posted September 26, 2009 Share Posted September 26, 2009 Only in the header. You need to restructure your page so that that code is added earlier in your script, before any output has been sent to the browser. Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.