I need to code that allows my to view an image for certain time and then hide it or disappear it please help me !!!!
I need to code that allows my to view an image for certain time and then hide it or disappear it please help me !!!!
hey,
you shold use javascript timeout here is an example :
Hope it's was helfull !!!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>![]()
<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
Change the part in red above to the image you want. Not tested, but should work. Hope this helps.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>
"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
Instead of making an botton saying 3 seconds passed is it possible to hide it or make it disapper image
Ok, try this:
Again, not tested.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>
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
Is not working but I think your close
the image does not disappear
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
thanks alot man great job
Thanks thanks thanks !!!! it works perfectly thanks alot
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