Popup page

Do you have a question? Post it now! No Registration Necessary.  Now with pictures!

Threaded View
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.


Re: Popup page

Shelly wrote:
Quoted text here. Click to load it

Seperate page:

if ($error) {
    header("Location: http://yoursite.com/errorpage.php?error=1 ");

Popup page:

if ($error) {
    $url = "http://yoursite.com/errorpage.php?error=1 ";
    print "<script>window.onload = function () {  

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.


Site Timeline