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 John Tel on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Advanced exit popup windows.

Status
Not open for further replies.

mattscotney

Programmer
Jul 31, 2002
57
AU
Hi php coders,

I have a site with around 16 pages. Each page on my site has the my standard nav bar with 15 internal and 2 external links.

I want code using mostly php to create a true exit popup window.

The popup window should not appear if the user clicks any of my defined internal or external links.

The popup window should not appear if the user clicks the back, forward, or refresh buttons on their browser window.

The popup window should only appear when the visitor leaves the site by any of the following methods:
1. Typing a new url in the browsers address bar.
2. Clicks the browsers home button.
3. Closes the browser window.
4. Exits the site through the first page they entered the site when using the back button.(example: user enters the site from google and is on parts.php, they surf around clicking various links including the parts.php button. The user then uses their back button to exit the site back to google, only when leaving the site through this method should the popup appear for the back button.)

The code should be well written and relatively easy to implement into my current site.

Thanks in advance,
Matt Scotney
 
There is no solution for what you want to do in PHP. PHP is a server-side scripting language.

The things you want to do, if they are at all possible to do, will require client-side scripting. PHP will only be involved in that you might use PHP to output the client-side script code.

I recommend that you post your question in the VBScript forum. You might also try the JavaScript forum, but I doubt JavaScript can do what you want. Want the best answers? Ask the best questions: TANSTAAFL!
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top