473,408 Members | 1,767 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,408 software developers and data experts.

Showing and Hiding DIV

Hi,

I would like to write some functionality into my app that does something similar to hotmail, where as when you hit the 'check mail' button a div pops up for a few seconds containing some info, then disappears again.

I would like to be able to show the div (with some info on) for 5 seconds or so, then hide it again. Can anyone point me in the right direction or provide some example code?

Cheers
Luke
Jan 2 '08 #1
3 1071
gits
5,390 Expert Mod 4TB
hi ...

let me give you a simple example:

[HTML]<html>
<head>

<script type="text/javascript">
function show_hint(id) {
var node = document.getElementById(id);

node.style.display = 'block';

window.setTimeout(function() { node.style.display = 'none'; }, 5000);

}
</script>

</head>
<body>
<a href="#" onclick="show_hint('my_hint');">show hint</a>
<div id="my_hint" style="display: none; border: 1px dotted red; color: red">My Hints</div>
</body>
</html>
[/HTML]
kind regards
Jan 2 '08 #2
Thanks thats given me a good starting point
Jan 2 '08 #3
gits
5,390 Expert Mod 4TB
hi ...

glad to hear that ... come back when you have more questions ...

kind regards
Jan 2 '08 #4

Sign in to post your reply or Sign up for a free account.

Similar topics

5
by: Dré | last post by:
Hi, I'm making a FAQ-page. To keep it a little synoptic, only the questions are visible. When you klick on a certain question, the answer appears. You can find an example at:...
2
by: c.anandkumar | last post by:
Hi All - I have some problems getting a small piece of javascript working correctly for Firefox. Here is what I am trying to do - 1. I have a form (like a search form) 2. I have many groups...
5
by: gregmercer | last post by:
I have the following html sample, where I'd like to have a show and hide two divs, one replacing the other. Following these two divs is a third div (the bluediv) which I would like to have placed...
2
by: EventListener | last post by:
I have a folder/file tree that is dynamically generated from an xml file. The way I've written it seems to work. Since I'm a fairly novice javascript programmer, I'm concerned that there may be a...
1
by: Amber | last post by:
The DataGrid allows you to make columns visible or invisible on demand - even edit and other special columns. This article will show you how it is done. Some developers have reported problems...
7
by: Mike9900 | last post by:
I am inheriting from a text box control and does not want the client see some of the methods be invisible to the clients. Mike
1
by: Anony | last post by:
Is it possible to hide and show widgets while the window is open?
2
by: =?Utf-8?B?Sm9zaCBTY2htaWR0?= | last post by:
I have a gridview that is being used for managing inventory. The default view shows the stock currently available. When editing I don't want the stock to be directly edited, rather the user will...
1
by: Grimm | last post by:
I am developing an internalk inteface that integrates alot of seperate tools into one interface. The current version uses one Iframe inside a div layer for positioning. Currently the seperate web...
17
by: rohitchawla | last post by:
i am trying to show and hide a div when onmouseover and onmouseover another div element. i am setting a setTimeout duration on onmouseout to delay the hiding of div for around two second The...
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...
0
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...
0
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.