Need Auto Popup or Popunder that works for Firefox

Discussion in 'JavaScript' started by moker, May 17, 2008.

  1. #1
    Hey everybody,

    I am searching for a javascript code for a Popup or Popunder, when a visitor gets on a website a popup/popunder appears, i dont want to annoy the visitor so i want it in 1 popup per session.

    its very easy to find the javascript for IE but for Firefox its very hard.

    can anyone help me with this?

    thanks in advance
     
    moker, May 17, 2008 IP
  2. crath

    crath Well-Known Member

    Messages:
    661
    Likes Received:
    33
    Best Answers:
    0
    Trophy Points:
    100
    #2
    are you using php?
     
    crath, May 18, 2008 IP
  3. moker

    moker Peon

    Messages:
    156
    Likes Received:
    2
    Best Answers:
    0
    Trophy Points:
    0
    #3
    no but my server has PHP installed

    tnx
     
    moker, May 18, 2008 IP
  4. crath

    crath Well-Known Member

    Messages:
    661
    Likes Received:
    33
    Best Answers:
    0
    Trophy Points:
    100
    #4
    You could mess with...
    <?php
    	session_start();
    	if( $_SESSION['popup'] == 'done'){
    		//The user has already seen the popup
    	} else {
    		$_SESSION['popup'] = 'done';
    		// Put the code for the popup here
    	}
    ?>
    Code (markup):
     
    crath, May 18, 2008 IP
  5. moker

    moker Peon

    Messages:
    156
    Likes Received:
    2
    Best Answers:
    0
    Trophy Points:
    0
    #5
    thanks Shane, but that is just the session.


    I need a javascript that could automaticlly popup 1 popup that works with Firefox and Internet Explorer

    tnx
     
    moker, May 18, 2008 IP
  6. crath

    crath Well-Known Member

    Messages:
    661
    Likes Received:
    33
    Best Answers:
    0
    Trophy Points:
    100
    #6
    replace
    // Put the code for the popup here
    Code (markup):
    with
    $text = "Your popup text goes here!";
    echo '<script type="text/javascript">alert(\'' . $text . '\');</script>';
    
    Code (markup):
     
    crath, May 18, 2008 IP
  7. insanity1983

    insanity1983 Peon

    Messages:
    1
    Likes Received:
    0
    Best Answers:
    0
    Trophy Points:
    0
    #7
    And what if I wanted a pop up for Firefox and Internet Explorer that will open a html file that contains the following webradio:

    The size of the pop up needs te be like 225 width and 30 height.
    I added a mediaplayer like option to stream an online radio.

    Thnx in advance
     
    insanity1983, Jul 19, 2008 IP