Witaj Gościu! ( Zaloguj | Rejestruj )

Forum PHP.pl

> [JavaScript] Jak to zrobic zeby wyswietlało raz na 24H
bambolo
post
Post #1





Grupa: Zarejestrowani
Postów: 135
Pomógł: 0
Dołączył: 10.02.2007

Ostrzeżenie: (10%)
X----


Witam dobrzy ludzie powiedzcie jak mam za pomocą cookie (chyba najlepiej) zrobic zeby oto ten skrypt wywalał mi okienko raz na 24h sad.gif a nie tak jak jest teraz co odswierzanie strony mi go ładuje sad.gif

  1.  
  2. <link rel="stylesheet" href="windowfiles/dhtmlwindow.css" type="text/css" />
  3.  
  4. <script type="text/javascript" src="windowfiles/dhtmlwindow.js">
  5.  
  6. /***********************************************
  7.  
  8. * DHTML Window Widget- Š Dynamic Drive (www.dynamicdrive.com)
  9.  
  10. * This notice must stay intact for legal use.
  11.  
  12. * Visit <a href="http://www.dynamicdrive.com/" target="_blank">http://www.dynamicdrive.com/</a> for full source code
  13.  
  14. ***********************************************/
  15.  
  16.  
  17.  
  18.  
  19.  
  20.  
  21. <link rel="stylesheet" href="modalfiles/modal.css" type="text/css" />
  22.  
  23. <script type="text/javascript" src="modalfiles/modal.js"></script>
  24.  
  25. </head>
  26.  
  27.  
  28. <!-##################### 1) DHTML Modal Window Example 1: ###################-->
  29.  
  30. <script type="text/javascript">
  31.  
  32.  
  33. var agreewin=dhtmlmodal.open("agreebox", "iframe","/zakaz.gif", "This image has been marked as adult content. You must be 18 years of age or older to proceed.", "width=300px,height=300px,center=1,resize=1,scrolling=0", "recal")
  34.  
  35.  
  36.  
  37. agreewin.onclose=function(){ //Define custom code to run when window is closed
  38.  
  39. var theform=this.contentDoc.getElementById("eula") //Access form with id="eula" inside iframe
  40.  
  41. var yesbox=theform.eulabox[0] //Access the first radio button within form
  42.  
  43. var nobox=theform.eulabox[1] //Access the second radio button within form
  44.  
  45. if (yesbox.checked==true)
  46.  
  47. alert("You agreed to the terms")
  48.  
  49. else if (nobox.checked==true)
  50.  
  51. alert("You didn't agree to the terms")
  52.  
  53. return true //Allow closing of window in both cases
  54.  
  55. }
  56.  
  57.  
  58.  
Go to the top of the page
+Quote Post

Posty w temacie


Reply to this topicStart new topic
1 Użytkowników czyta ten temat (1 Gości i 0 Anonimowych użytkowników)
0 Zarejestrowanych:

 



RSS Aktualny czas: 20.08.2025 - 05:52