Popup page

Collapse
This topic is closed.
X
X
 
  • Time
  • Show
Clear All
new posts
  • Shelly

    Popup page

    I would like to have a popup page. In case of errors, I would like to have
    a separate page (of small size) pop up with the error message. How can I
    make this happen? It would make life much easier.

    Shelly


  • Janwillem Borleffs

    #2
    Re: Popup page

    Shelly wrote:[color=blue]
    > I would like to have a popup page. In case of errors, I would like
    > to have a separate page (of small size) pop up with the error
    > message. How can I make this happen? It would make life much easier.
    >[/color]

    Seperate page:

    if ($error) {
    header("Locatio n: http://yoursite.com/errorpage.php?e rror=1");
    exit;
    }

    Popup page:

    if ($error) {
    $url = "http://yoursite.com/errorpage.php?e rror=1";
    print "<script>window .onload = function () {
    window.open('$u rl');}</script>";
    }

    The Seperate page solution should be included at the top of each page
    (before anything else has been outputted); the Popup page solution should be
    between the <head /> tags of each page. The error parameter gets translated
    into an appropriate message on errorpage.php

    It's up to you to decide if this really makes life easier.


    JW



    Comment

    Working...