Log in

View Full Version : How do you make a popup image in html that will close after 5 seconds?


Jakesnake
Jul 10, 2010, 12:07 PM
I have recently developed my website; http://jake-thompson.co.uk but want to have an image that pop's up in the middle of the page that will then automatically close itself in 5 seconds.

crigby
Jul 12, 2010, 10:36 AM
Hi,
This is not done in HTML. It is done in JavaScript with window.open(). The bad news is that almost any of the current or recent pop-up blockers will block its display. There is a program that is supposed to get around it with what is call a Pop-over.
Peace,
Clarke

slapshot_oi
Jul 12, 2010, 11:36 AM
Pop-ups are a thing of the past, use a modal window.

JQuery (http://jquery.com/)

crigby
Jul 13, 2010, 08:41 AM
Hi,
Try this link:
Modal Image Box (http://javascript.about.com/library/blmodal1.htm)
Also see:
http://javascript.about.com/library/blmodal.htm
Though it seems that they require interaction and do not timeout. Know I have seen it done in the past, but cannot remember where.
Peace,
Clarke