Image to appear after the page load
-
Hi Guys, I want my images on the page to load after the contents of the page are loaded.I have about 10 images in my page which causes the delay to load my page. If anyone has suggestions or coding please reply. Thanks jith
-
Hi Guys, I want my images on the page to load after the contents of the page are loaded.I have about 10 images in my page which causes the delay to load my page. If anyone has suggestions or coding please reply. Thanks jith
Before U start, please read about Buffer property of the Response class. <%response.Buffer=true%> <html> <body> <% Objects to be rendered first %> <%response.Flush%> Images to be rendered last </body> </html> Hope, this helps u. Regards, Arun Kumar.A
-
Hi Guys, I want my images on the page to load after the contents of the page are loaded.I have about 10 images in my page which causes the delay to load my page. If anyone has suggestions or coding please reply. Thanks jith
You may want to consider including your
img
tags with an emptysrc
attribute in your initial HTML. You could then include a client script fragment to set thesrc
after the page has loaded. For example:<html> <head> <script language = "javascript" type = "text/javascript"> function LoadImages() { document.getElementById('myImage').src = 'http://www.server.com/image.jpg'; } </script> </head> <body onload = "LoadImages(); return true;"> <!-- blah blah HTML --> <img id = "myImage" src = "" alt = "" /> <!-- blah blah more HTML --> </body> </html>
Hope that helps. :)
--Jesse
"... the internet's just a big porn library with some useful articles stuck in." - Rob Rodi