Java script Popunder

Discussion in 'JavaScript' started by ThoRaK, Jul 4, 2010.

  1. #1
    <script language="JavaScript">
    
    	function webrom_click_under_jump(){
    
    		if (wr_clickunder_jump==0){
    
    			wr_clickunder_win=window.open("http://google.com", "_blank","toolbar=yes, location=yes, directories=yes, status=yes, menubar=yes, scrollbars=yes, copyhistory=yes, width="+window.width+", height="+window.height+", left="+window.screenX+", top="+window.screenY+", resizable=yes");
    
    			wr_clickunder_win.blur();
    
    			window.focus();
    
    			wr_clickunder_jump=1;
    
    		}
    
    	} 
    
    wr_clickunder_jump=0;
    
    setTimeout('document.onclick=webrom_click_under_jump;', 100);
    
    </script>
    Code (markup):
    How can i make this javascript to work only once a day?
     
    ThoRaK, Jul 4, 2010 IP
  2. Rainulf

    Rainulf Active Member

    Messages:
    373
    Likes Received:
    12
    Best Answers:
    0
    Trophy Points:
    85
    #2
    Anyone, correct me if I'm wrong, but that's not possible with javascript alone. But I think it's possible if you want it to work on certain time (user's local time). ;)
     
    Rainulf, Jul 5, 2010 IP
  3. anands

    anands Well-Known Member

    Messages:
    436
    Likes Received:
    3
    Best Answers:
    0
    Trophy Points:
    120
    #3
    I think you just have to put it in a html file and then use scheduler to run the script.
     
    anands, Jul 6, 2010 IP