3
Contributors
7
Replies
8
Views
7 Years
Discussion Span
Last Post by almostbob
0

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

0

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>

Edited by almostbob: n/a

0

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/

0
<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);

0

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

0

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

This question has already been answered. Start a new discussion instead.
Have something to contribute to this discussion? Please be thoughtful, detailed and courteous, and be sure to adhere to our posting rules.