Pop up question

Discussion in 'HTML & Website Design' started by TheEvilPeter, Apr 10, 2009.

  1. #1
    I own a directory and would like to add a pop up linking to one of my other websites. Is it easy to do?
     
    TheEvilPeter, Apr 10, 2009 IP
  2. ExtremeData

    ExtremeData Well-Known Member

    Messages:
    450
    Likes Received:
    21
    Best Answers:
    0
    Trophy Points:
    125
    #2
    Add this script on <head> section :

    <script language="javascript" type="text/javascript">
    <!--
    function popitup(url) {
    	newwindow=window.open(url,'Website Name','height=500,width=500');
    	if (window.focus) {newwindow.focus()}
    	return false;
    }
    
    // -->
    </script>
    Code (markup):
    Add this code on your body tag :
    onLoad="return popitup('http://example.com')"
    Code (markup):
    So the body tag will be like that :
    
    
    <body onLoad="return popitup('http://example.com')">
    
    
    Code (markup):
     
    ExtremeData, Apr 10, 2009 IP