Re: Closing a web page

From: Xenovoyance (0703673492_at_home.se)
Date: 07/04/04


Date: Sun, 04 Jul 2004 12:07:06 +0200

Bruce A. Julseth wrote:

> What will the code look like to completely close a session? I want to put an
> "Exit" button on my form. Clicking this "Exit" button will cause the web
> page completely close down, just like clicking the "X" (close) in the upper
> right hand corner of the brower window.
>
> Thanks....
>
> Bruce
>
>
>

That is a job for javascript, not php. This is because of closing a
window is something that you want to do on the client side and if you
think a bit you will most defenatly have heard that php is a server-side
language =)

Anyway, here is the javascript code..

<a href="javascript:window.close();">Close This Window</a>

Cheers,
Xenovoyance