Reply to Re: Popup page

Your name:

Reply:


Posted by Janwillem Borleffs on 07/31/05 13:16

Shelly wrote:
> 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.
>

Seperate page:

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

Popup page:

if ($error) {
$url = "http://yoursite.com/errorpage.php?error=1";
print "<script>window.onload = function () {
window.open('$url');}</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

[Back to original message]


Удаленная работа для программистов  •  Как заработать на Google AdSense  •  England, UK  •  статьи на английском  •  PHP MySQL CMS Apache Oscommerce  •  Online Business Knowledge Base  •  DVD MP3 AVI MP4 players codecs conversion help
Home  •  Search  •  Site Map  •  Set as Homepage  •  Add to Favourites

Copyright © 2005-2006 Powered by Custom PHP Programming

Сайт изготовлен в Студии Валентина Петручека
изготовление и поддержка веб-сайтов, разработка программного обеспечения, поисковая оптимизация