i like this one http://articles.sitepoint.com/article/script-popup-windows-flash.
Does anybody knows how to implement this one or maybe the developer page were can i get the code.

Recommended Answers

All 7 Replies

does anybody know how to write the code, i need for my website for some adds, i don#t want to use popups

to avoid popups use layers
make them visible or not

<script type="text/javascript"><!--
(document.getElementById) ? dom = true : dom = false;
function hideIt(thiselement) {
if (dom) {document.getElementById(thiselement).style.visibility='hidden';}
if (document.layers) {document.layers[thiselement].visibility='hide';} }
function showIt(thiselement) {
if (dom) {document.getElementById(thiselement).style.visibility='visible';}
if (document.layers) {document.layers[thiselement].visibility='show';} }
--></script>
<a id="me" href='#' onClick="showIt('hideable');">Show </a><span id='hideable'  style="position:fixed; top:20px; left:10px; width:45%; visibility:hidden; padding:10px; margin:10px; background:#ececec; border: 1px solid;">put ADVERTISING here<br><button id="frrm" onClick="hideIt('hideable');">Close</button></span>

thanks for this one, but i need something what is going to open after you enter the website let's say after 5 sec, and automatically it's showing up on the middle of the page, the same thins it's used in here in the forum, before you login as a member after a few seconds it's showing a window were it's asking you to join de daniweb.com.
It's simillar to to the lightbox script. http://leandrovieira.com/projects/jquery/lightbox/

<head><script type="text/javascript"><!--
(document.getElementById) ? dom = true : dom = false;
function hideIt(thiselement) {
if (dom) {document.getElementById(thiselement).style.visibility='hidden';}
if (document.layers) {document.layers[thiselement].visibility='hide';} }
function showIt(thiselement) {
if (dom) {document.getElementById(thiselement).style.visibility='visible';}
if (document.layers) {document.layers[thiselement].visibility='show';} }
--></script></head>
<body onload='showIt("hideable");'>
<span id='hideable' style="position:fixed; top:20px; left:10px; width:45%; visibility:hidden; padding:10px; margin:10px; background:#ececec; border: 1px solid; text-align:center;"><br>Javascript is like flexible dude<br><br><button id="frrm" onClick="hideIt('hideable');">Close</button></span></body>

:)
setWaittime(function,delaymicroseconds);

how do you use this setWaittime, maybe you mean this one :

setTimeout("function expression",delaytime)

though i can setup it to open after the 5 sec first page loaded

I do settimeout, sleep deprived and stupid, work during the night painting the house in the day, went to court
that line wasnt supposed to be included till I got the fuzz out of my head, a sad case, even now I should have a nap

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.