Hello and welcome to our community! Is this your first visit?
Register
Enjoy an ad free experience by logging in. Not a member yet? Register.
Results 1 to 2 of 2
  1. #1
    Regular Coder
    Join Date
    Jun 2002
    Location
    London, UK
    Posts
    127
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Loading Image before page

    Hi,

    i have an image i want to load before any other element in the page. is there a simple tiny but very effective script to do this.

    DHTMLHELP

  • #2
    Regular Coder
    Join Date
    May 2002
    Location
    Maine, USA
    Posts
    573
    Thanks
    0
    Thanked 0 Times in 0 Posts
    You could pre-load the image in the head section of the page, like so:

    <html>
    <head>
    <title>Example</title>
    <script language="JavaScript" type="text/javascript">
    image1 = new Image();

    image1.src = "yourImage.gif";
    </script>

    </head>
    <body>
    Content here...
    </body>
    </html>
    Just change "yourImage.gif" to the name of the image you want to pre-load.
    boxer_1
    CodingForums Moderator
    "How did a fool and his money get together in the first place?"


  •  

    Posting Permissions

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