You can do a Div popup window using Javascript to turn on/off the
display property of an element. Just make sure that the element that
your effecting has a zIndex higher then the document content so it
displays over it. Below I provided a simple example. You need to call
the javascript functions with some action but it should give you an
idea on how this is accomplished. The one thing this example does not
handle is where to positon the popup. If you want it to dynamically
center into the client's window you will need to add some more js. If
you decide to go that route you need to detect the window width/height
and the scrolls offsets and then get the render size of the object that
your turning on and do a bit of math to calculate where to position it.
Hope this helps.
<style>
#popup {
position: absolute;
display:none;
z-index: 100;
}
</style>
<script>
function showPopup(){
if( !document.getElementById ) return;
document.getElementById('popup').style.display = 'block';
}
function hidePopup(){
if( !document.getElementById ) return;
document.getElementById('popup').style.display = 'none';
}
</script>
<div id="popup"><img src="animated.gif"></div>
Received on Tue Feb 7 21:29:07 2006