View Full Version : window

03-19-2008, 05:27 AM
I need help here. I want to put a flying announcement window on my page. I need something that I can show my users an announcement when they load my site. I don't want a pop up as such but a window on top of the entrance page that they can read the announcement and then close it when they are done.

I know how to place a fixed window on it but i want to be able to allow them to close it when done by clicking on the word "close". Does this make sense?

03-19-2008, 06:05 AM
See if this code helps ;)

<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01//EN"
<style type="text/css">
#message{width:300px;height:100px;margin:1px auto;background:#efefff;border:1px dotted #222;text-align:center;}
<script type="text/javascript">
window.onload = function()
document.getElementById('close').onclick = function()
document.getElementById('message').style.display = 'none';
<div id="message">
Read This please
<span id="close">Close</span>

03-19-2008, 02:36 PM
Thank you rangana

This is exactly what I was looking for. I appreciate the help.:thumbsup:

03-19-2008, 03:42 PM
And here’s a good article/tutorial on DHTML popups (http://dhtmlpopups.webarticles.org/) that might be of interest.