Page 1 of 2 12 LastLast
Results 1 to 10 of 12

Thread: Help with Images

  1. #1
    Join Date
    Mar 2007
    Posts
    17
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Default Help with Images

    I need to code that allows my to view an image for certain time and then hide it or disappear it please help me !!!!

  2. #2
    Join Date
    Mar 2007
    Posts
    6
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Default

    hey,

    you shold use javascript timeout here is an example :
    Code:
    <script type="text/javascript">
    <!--
    function timingex( ){
    setTimeout("alert('Three seconds has passed.');",3000);
    }
    // -->
    </script>
    
    <form>
    <input type="button" VALUE="Click me!" OnClick="timingex( )">
    </form>
    Hope it's was helfull !!!

  3. #3
    Join Date
    Mar 2007
    Posts
    17
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Default

    <html>

    <head>
    <meta name="GENERATOR" content="Microsoft FrontPage 5.0">
    <meta name="ProgId" content="FrontPage.Editor.Document">
    <meta http-equiv="Content-Type" content="text/html; charset=windows-1252">
    <title>New Page 1</title>
    </head>

    <body>
    <script type="text/javascript">
    <!--
    function timingex( ){
    setTimeout("alert('Three seconds has passed.');",10000);
    }
    // -->
    </script>

    <form>
    <input type="button" VALUE="Click me!" OnClick="timingex( )">
    </form>
    </body>

    </html>


    I need an Image not a botton could you code with an image

  4. #4
    Join Date
    Sep 2006
    Location
    St. George, UT
    Posts
    2,769
    Thanks
    3
    Thanked 157 Times in 155 Posts

    Default

    Code:
    <html>
    
    <head>
    <meta name="GENERATOR" content="Microsoft FrontPage 5.0">
    <meta name="ProgId" content="FrontPage.Editor.Document">
    <meta http-equiv="Content-Type" content="text/html; charset=windows-1252">
    <title>New Page 1</title>
    
    
    <script type="text/javascript">
    <!--
    
    function hideImg(){
    
    setTimeout("alert('Three seconds has passed.');",3000);
    
    document.getElementById('hideImg').style.visibility = 'none';
    }
    
    // -->
    </script>
    
    </head>
    
    <body>
    
    <div id="hideImg">
       <img src="test.gif" onload="hideImg();">
    </div>
    
    </body>
    
    </html>
    Change the part in red above to the image you want. Not tested, but should work. Hope this helps.
    "Computer games don't affect kids; I mean if Pac-Man affected us as kids, we'd all be running around in darkened rooms, munching magic pills and listening to repetitive electronic music." - Kristian Wilson, Nintendo, Inc, 1989
    TheUnlimitedHost | The Testing Site | Southern Utah Web Hosting and Design

  5. #5
    Join Date
    Mar 2007
    Posts
    17
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Default

    Instead of making an botton saying 3 seconds passed is it possible to hide it or make it disapper image

  6. #6
    Join Date
    Sep 2006
    Location
    St. George, UT
    Posts
    2,769
    Thanks
    3
    Thanked 157 Times in 155 Posts

    Default

    Ok, try this:

    Code:
    <html>
    
    <head>
    <meta name="GENERATOR" content="Microsoft FrontPage 5.0">
    <meta name="ProgId" content="FrontPage.Editor.Document">
    <meta http-equiv="Content-Type" content="text/html; charset=windows-1252">
    <title>New Page 1</title>
    
    
    <script type="text/javascript">
    <!--
    
    function hideImg(){
    
       setTimeout('dohide()',3000);
    
    }
    
    function dohide() {
    
       document.getElementById('hideImg').style.visibility = 'hidden';
    
    }
    // -->
    </script>
    
    </head>
    
    <body>
    
    <div id="hideImg">
       <img src="test.gif" onload="hideImg();">
    </div>
    
    </body>
    
    </html>
    Again, not tested.
    Last edited by thetestingsite; 03-05-2007 at 03:58 PM.
    "Computer games don't affect kids; I mean if Pac-Man affected us as kids, we'd all be running around in darkened rooms, munching magic pills and listening to repetitive electronic music." - Kristian Wilson, Nintendo, Inc, 1989
    TheUnlimitedHost | The Testing Site | Southern Utah Web Hosting and Design

  7. #7
    Join Date
    Mar 2007
    Posts
    17
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Default

    Is not working but I think your close

    the image does not disappear

  8. #8
    Join Date
    Sep 2006
    Location
    St. George, UT
    Posts
    2,769
    Thanks
    3
    Thanked 157 Times in 155 Posts

    Default

    Editted (spelling?) the code once again. One little mistake that I found with the visibility. Notice the part in blue in the second code snippet above.

    Hope this helps.
    "Computer games don't affect kids; I mean if Pac-Man affected us as kids, we'd all be running around in darkened rooms, munching magic pills and listening to repetitive electronic music." - Kristian Wilson, Nintendo, Inc, 1989
    TheUnlimitedHost | The Testing Site | Southern Utah Web Hosting and Design

  9. #9
    Join Date
    Mar 2007
    Posts
    17
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Default Thanks a million!!!

    thanks alot man great job


    Thanks thanks thanks !!!! it works perfectly thanks alot

  10. #10
    Join Date
    Mar 2007
    Posts
    17
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Default Do you know how

    Do you know how to use this same technique for an video

    Like a video playing for certain time and then be hidden is it possible

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
  •