Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Shaun E on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Auto close of website Java script

Status
Not open for further replies.

Bmstenner

Technical User
Jul 22, 2002
88
AU
Ok, this might not be the right forum to post this in, but I thought this would be a programming issue as it seems PHP or HTML cannot perform these actions.

I have a PHP website that when opened, it will email the specified person the computers email address, currently when it does this, it will request "javascript is trying to close this window, will you let it?"

Is there some way to make this automated? so it just closes without a question? i thought i might be able to write a small program to handle this, any info would be appreciated,

I will email anyone who wants the PHP form as an attachment...

Thanks guys,


Brendan.

 
From what I know about JavaScript, you're limited in what you can do with it. If you weren't, you could write a page that would close all a user's browser windows when they went to it. As it is, you can't close a window unless you also opened it. That's why it asks.

I also know you can gain a security certificate thing and somehow add it to your scripts; this lets JavaScript do things like close windows without asking, but the user has to say "Yes, I accept this page as being secure and allow it to do whatever it wants." This process costs money and requires a background check, and probably isn't worth it unless you're a business.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top