1. This site uses cookies. By continuing to use this site, you are agreeing to our use of cookies. Learn More.

plz I need force pop up script

Discussion in 'HTML & JavaScript' started by aljawarh, Oct 27, 2009.

  1. aljawarh

    aljawarh Newbie

    Joined:
    May 3, 2009
    Messages:
    16
    Likes Received:
    0
    Home Page:
    hi!

    help me plz iam looking for work force pop up script
     
  2. webblackart

    webblackart Registered Member

    Joined:
    May 13, 2009
    Messages:
    60
    Likes Received:
    9
    what do you mean by force pop up, i dont know anybody who likes popups?

    normaly you simply add the window.open function to the onload event of your site. if you like you can set a timer and so on

    here some code

    Code:
    <script language="JavaScript"> 
    function popup1() 
    { 
     var breite=280; 
     var hoehe=160; 
     var positionX=((screen.availWidth / 2) - breite / 2); 
     var positionY=((screen.availHeight / 2) - hoehe / 2); 
     var url='http://www.google.com'; 
     pop=window.open('','','toolbar=0,location=0,directories=0,status=0,menubar=0,scrollbars=0,resizable=0,fullscreen=0,width='+breite+',height='+hoehe+',top=0,left=0'); 
     pop.resizeTo(breite,hoehe); 
     pop.moveTo(positionX,positionY); 
     pop.location=url; 
     }
    </script>
    
    
    onLoad='popup1()'
    onLoad="window.setTimeout('popup1()', 1000);"
    onUnLoad='popup1()'