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
    New to the CF scene
    Join Date
    Sep 2005
    Posts
    1
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Settings the time for an image.

    Provide the script to set the time out to an image loading.
    if the image is not loaded in 30 seconds the given error page has to be displayed.

    Thanks
    Anjum

  • #2
    Regular Coder
    Join Date
    Aug 2005
    Location
    Toronto, ON, Canada
    Posts
    231
    Thanks
    0
    Thanked 0 Times in 0 Posts
    Code:
    <head>
    <script>
    var showErrorPage = true;
    
    function loadErrorPage() {
       if(showErrorPage) {
          //load error page
       }
    }
    </script>
    </head>
    <body>
    ...
    <script>
    setTimeout('loadErrorPage();', 30000);
    </script>
    <img src="..." onload="showErrorPage=false;">
    ...
    </body>
    rm -f /


  •  

    Posting Permissions

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