visitor (0 QPoints)
  • FR
  • EN
  • NL
  • DE
  • ES
315 experts, 1193 registered users, 1659 questions already answered
European Experts Exchange, the very best site for high-quality IT solutions

New Improved Search!

 


05/10/2011 1h30 : Steve Jobs is dead, the father of Apple ][ is gone, we are all orphaned.

Languages :: DHTML, JScript :: auto closing popup window for displaying message


By: Bernard France  Date: 13/06/2007 08:01:57  English  Points: 20 Status: Answered
Quality : Excellent
how to make an auto closing popup window for displaying a message ?
By: VGR Date: 13/06/2007 08:08:57 English  Type : Answer
hi

there are multiple solutions, nowadays not using popups (ad blocking, popup blocking, etc) but rether layers ; you could also use a standard span or div in the DHTML and display/hide it using the display style property.

If you want to use a real popup, something like this will do the trick :

definition ($pop_h and $pop_l come from PHP)

// here doctype, html, head <script language="JavaScript" type="text/javascript"> <!-- Hide from JavaScript-Impaired Browsers function NYI() { windowIMA=window.open("",'Anim2','toolbar=no,location=yes,directories=no,menubar=no,scrollbars=no,status=yes,resizable=1,width=$pop_l,height=$pop_h'); windowIMA.document.write("<!DOCTYPE html PUBLIC \"-//W3C//DTD HTML 4.0 Transitional//EN\"><html><head><title>Not yet implemented<\/title>" +"<script type=\"text/javascript\">setTimeout('self.close();',3000);<\/script>" +"<\/head><body BGCOLOR=\"#000000\" text=\"white\"><center>" +"<P>$globFTitre<\/P> Not yet implemented... patience !" +" " +" your webmaster" +" this window will close in 3 seconds.&nbsp;<a href='javascript:self.close()'><font color=\"red\">close now!<\/font><\/A> " +"<\/center><\/body><\/html>"); windowIMA.document.close(); } // End Hiding --> </script>



use :

<a href="javascript:NYI();"><font color=#da6600><b>some feature NYI</b></font></a>



regards
By: VGR Date: 13/06/2007 08:09:30 English  Type : Comment
extra empty lines are &lt;BR&gt; lines ;-)

Do register to be able to answer

EContact
browser fav
page generated in 336.968900 milliseconds

Why Google AdSense ads ?

compteur
 Ranking-Hits PageRank for this page