tikkai maacos Posted August 20, 2008 Report Share Posted August 20, 2008 Sveiki... man ir shitaads kods: <style> #ok { position:absolute; left:100; top:100; width:200; height:200; padding:10px; z-index:2; background-color: #CCFFFF; border:1px; border-style:solid; border-color:#705610; } #content { z-index:1; } </style> <script type="text/javascript"> function hideok() { if(document.getElementById) document.getElementById("ok").style.visibility = "hidden"; } function showok() { if(document.getElementById) document.getElementById("ok").style.visibility = "visible"; } var onoff="on" function get_cookie(Name) { //this function is used only if you had selected popup to load ONCE per session //You may remove this function if variable "onoff" above is set to "off" var search = Name + "=" var returnvalue = ""; if (document.cookie.length > 0) { offset = document.cookie.indexOf(search) if (offset != -1) { // if cookie exists offset += search.length // set index of beginning of value end = document.cookie.indexOf(";", offset); // set index of end of cookie value if (end == -1) end = document.cookie.length; returnvalue=unescape(document.cookie.substring(offset, end)) } } return returnvalue; } function loadpopup(){ if (onoff=="on"){ if (get_cookie('alreadypopped')==''){ showok() document.cookie="alreadypopped=yes" } } else openpopup() } loadpopup() </script> <div id="ok" style="width:400;height:400;visibility:hidden"> Shitas ir labais :)<a name=top href="java script:hideok()"><font color=red>[</font>X<font color=red>]</font></a></div> kautkas nestraada... ja es if (get_cookie('alreadypopped')==''){ showok() document.cookie="alreadypopped=yes" vietaa ielieku if (get_cookie('alreadypopped')==''){ alert('viss ir ok...') document.cookie="alreadypopped=yes" tad viss straada... kur vareetu buut probleema.... katraa zinjaa man vajag lai paraadaas DIV tags vienu reizi sesija.... Paldies.... Link to comment Share on other sites More sharing options...
indoom Posted August 20, 2008 Report Share Posted August 20, 2008 Tāpēc, ka skripts DOMā ielikts pirms id="ok" divs tiek izveidots, tāpēc to nevar atrast. Ieliec vainu pēc tam vai iekš onload to loadpopup() Link to comment Share on other sites More sharing options...
tikkai maacos Posted August 20, 2008 Author Report Share Posted August 20, 2008 Perfekti... Lielais paldies... varam taisit ciet! Link to comment Share on other sites More sharing options...
Recommended Posts