By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
438,216 Members | 1,032 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 438,216 IT Pros & Developers. It's quick & easy.

Closing a web page

P: n/a
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

Jul 17 '05 #1
Share this Question
Share on Google+
1 Reply


P: n/a
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
Jul 17 '05 #2

This discussion thread is closed

Replies have been disabled for this discussion.