Results 1 to 6 of 6

Thread: Using loading.gif images

  1. #1
    Join Date
    Mar 2008
    Posts
    34
    Thanks
    7
    Thanked 1 Time in 1 Post

    Question Using loading.gif images

    Hi everyone, I apologise in advance for such a n00b question. I have found some stuff online pertaining to the following question however it is a little over my head.

    I am creating a advertising portfolio where I will be preloading several hi res images for those viewers who are happy to wait. In order to add a touch of professionalism to the site I was wanting to add a load.gif image until the image is completely loaded and then displayed.

    Simply put, I have one large image in a DIV, i am able to place the loading.gif underneath however I am wanting to hide the large image until it is fully loaded so it simply flashes up over the top of the loading.gif instead of blinds it's way down the div area.

    Did that make any sense at all?

    If anyone is able to point me in the right direction for this it would be greatly appreciated.

    PS: I am using simple HTML, no server side includes or anything like that (again, too much for my pea size brain to deal with).

    Richard.

  2. #2
    Join Date
    Jul 2008
    Posts
    199
    Thanks
    6
    Thanked 58 Times in 57 Posts

    Default

    This isn't exactly what you want, but it should help you along:
    HTML Code:
    <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
        "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
    <html xmlns="http://www.w3.org/1999/xhtml">
    <head>
      <title>test</title>
      <script type="text/javascript">
      function _onload(){
        document.getElementById('loading').style.display = 'none';
      }
      </script>
    </head>
    <body onload="_onload()">
    <div id="loading" style="position: absolute; top: 5px; right: 5px; background: #FF0000; color: #FFF; padding: 3px; font-size: 12px;">
      Loading...
    </div>
    
    <!-- YOU IMAGES HERE -->
    <img src="http://upload.wikimedia.org/wikipedia/commons/e/e2/Theodore_Rooseveltnewtry.jpg" alt="" />
    
    </body>
    </html>

  3. The Following User Says Thank You to techietim For This Useful Post:

    mobius2000 (07-09-2008)

  4. #3
    Join Date
    Mar 2008
    Posts
    34
    Thanks
    7
    Thanked 1 Time in 1 Post

    Default

    Thank you TechieTim, wasn't exactly what I was after however yours achieves the same out come so I take my hat off to you sir... Your a life saver.

    Just out of curiosity to you or anyone who views this, using the same technique as above, is there anyway of making the layer fadeout instead of disappear?

    Not a huge trouble if it can't or if too hard however I have searched everywhere and I'm afraid I am just having no luck with examples/tutes for onload fadeout of layers.

    Thank you in advance to anyone who is able to help further and thank you again TechieTim.

  5. #4
    Join Date
    Jan 2008
    Posts
    4,168
    Thanks
    28
    Thanked 628 Times in 624 Posts
    Blog Entries
    1

    Default

    Does this page help you out?:
    http://github.com/madrobby/scriptacu...is/effect-fade
    Download scriptaculous at http://script.aculo.us/.
    Jeremy | jfein.net

  6. The Following User Says Thank You to Nile For This Useful Post:

    mobius2000 (07-10-2008)

  7. #5
    Join Date
    Mar 2008
    Posts
    34
    Thanks
    7
    Thanked 1 Time in 1 Post

    Default

    Thank you soooo much, that is great.... Thank you to techietim and Nile for all your assistance here.

  8. #6
    Join Date
    Jan 2008
    Posts
    4,168
    Thanks
    28
    Thanked 628 Times in 624 Posts
    Blog Entries
    1

    Default

    I'm glad to help you, mobius.
    Jeremy | jfein.net

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •