Hallo allerseits!
Ich hab hier ein kleines JS-Script bei dem ich nicht weiterkomme. Ich öffne über das onload-Attribut im Body ein herkömliches Layer-Popup:
|
Cascading Style Sheets
|
1
2
3
4
5
6
7
8
9
10
11
12
13
|
#popup {
position: absolute;
visibility: hidden;
width: 427px;
height: 182px;
left: 220px;
top: -100px;
background-color: #ccc;
border: 1px solid #000;
padding: 10px;
background:url('images/popup_background.jpg');
background-repeat:repeat-x;
}
|
|
JavaScript Code
|
1
2
3
4
5
6
|
function setVisible(obj)
{
obj = document.getElementById(obj);
obj.style.visibility = (obj.style.visibility == 'visible') ? 'hidden' : 'visible';
obj = document.setTimeout('obj.style.visibility == "hidden"',5000);
}
|
|
HTML Code
|
1
2
3
|
<div id="popup">
Inhalt
</div>
|
Öffnen tut sich das Popup, nur, dass es sich nach ein paar Sekunden wieder von alleine schließt - das will noch nicht so recht....
Was JS angeht, bin ich ehrlich gesagt blutiger Anfänger... darum würde ich mich um Unterstützung sehr freuen
//////// EDIT
Hat sich geklärt!