abanksob1 Posted February 9, 2010 Report Share Posted February 9, 2010 hi i went on line and found a code for a java scrip pop up page gray out how ever i want this scrip to automatic comes up after five seconds what code do i need to change below for this to happen currently it come up only is people click the shaw button please advise function showPopUp(el) { var cvr = document.getElementById("cover") var dlg = document.getElementById(el) cvr.style.display = "block" dlg.style.display = "block" if (document.body.style.overflow = "hidden") { cvr.style.width = "1024" cvr.style.height = "100%" } } function closePopUp(el) { var cvr = document.getElementById("cover") var dlg = document.getElementById(el) cvr.style.display = "none" dlg.style.display = "none" document.body.style.overflowY = "scroll" } #cover { display:none; position:absolute; left:0px; top:0px; width:100%; height:100%; background:gray; filter:alpha(Opacity=50); opacity:0.5; -moz-opacity:0.5; -khtml-opacity:0.5 } #dialog { display:none; left:300px; top:150px; width:380px; height:350px; position:absolute; z-index:100; background:#00CCFF; padding:2px; font:10pt tahoma; border:1px solid gray } .style2 { color: #000066; font-weight: bold; } Free Quick Moving Quote [Close] Show Quote Link to comment Share on other sites More sharing options...
shelfimage Posted February 13, 2010 Report Share Posted February 13, 2010 you might consider jQuery - try this example and increase the fade in parameter to suit your needs http://deseloper.org/read/2009/10/jquery-simple-modal-window/ Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.