Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • World
  • Users
  • Groups
Skins
  • Light
  • Cerulean
  • Cosmo
  • Flatly
  • Journal
  • Litera
  • Lumen
  • Lux
  • Materia
  • Minty
  • Morph
  • Pulse
  • Sandstone
  • Simplex
  • Sketchy
  • Spacelab
  • United
  • Yeti
  • Zephyr
  • Dark
  • Cyborg
  • Darkly
  • Quartz
  • Slate
  • Solar
  • Superhero
  • Vapor

  • Default (No Skin)
  • No Skin
Collapse
Code Project
  1. Home
  2. Web Development
  3. ASP.NET
  4. Image to appear after the page load

Image to appear after the page load

Scheduled Pinned Locked Moved ASP.NET
3 Posts 3 Posters 0 Views 1 Watching
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • J Offline
    J Offline
    jithbiz0033
    wrote on last edited by
    #1

    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

    A J 2 Replies Last reply
    0
    • J jithbiz0033

      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

      A Offline
      A Offline
      Arun Immanuel
      wrote on last edited by
      #2

      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

      1 Reply Last reply
      0
      • J jithbiz0033

        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

        J Offline
        J Offline
        Jesse Squire
        wrote on last edited by
        #3

        You may want to consider including your img tags with an empty src attribute in your initial HTML. You could then include a client script fragment to set the src 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

        1 Reply Last reply
        0
        Reply
        • Reply as topic
        Log in to reply
        • Oldest to Newest
        • Newest to Oldest
        • Most Votes


        • Login

        • Don't have an account? Register

        • Login or register to search.
        • First post
          Last post
        0
        • Categories
        • Recent
        • Tags
        • Popular
        • World
        • Users
        • Groups