Go Back   CodingForums.com > :: Client side development > JavaScript programming

Before you post, read our: Rules & Posting Guidelines

Reply
 
Thread Tools Rate Thread
Enjoy an ad free experience by logging in. Not a member yet? Register.
Old 06-16-2004, 08:54 AM   PM User | #1
Pompiuses
Regular Coder

 
Join Date: Jun 2002
Posts: 101
Thanks: 0
Thanked 0 Times in 0 Posts
Pompiuses is an unknown quantity at this point
Display a message box for a certain number of seconds

As topic states ; how can I do this?

Last edited by Pompiuses; 06-16-2004 at 08:58 AM..
Pompiuses is offline   Reply With Quote
Old 06-16-2004, 09:45 AM   PM User | #2
Kor
Red Devil Mod


 
Kor's Avatar
 
Join Date: Apr 2003
Location: Bucharest, ROMANIA
Posts: 8,478
Thanks: 58
Thanked 379 Times in 375 Posts
Kor has a spectacular aura aboutKor has a spectacular aura about
Use setTimeout() method. Try this

PHP Code:
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<
html>
<
head>
<
script>
time=3000;//time to stay on, in milliseconds
function closeMes(){
document.getElementById('mes').style.display='none'
}
window.onload=function(){setTimeout('closeMes()',time)}
</script>
</head>
<body>
<div id="mes" style="position:absolute; background-color:#CCCCCC">This message will stay on for 3 seconds</div>
</body>
</html> 
__________________
KOR
Offshore programming
-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*
Kor is offline   Reply With Quote
Reply

Bookmarks

Jump To Top of Thread


Thread Tools
Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT +1. The time now is 10:52 PM.


Advertisement
Log in to turn off these ads.