PDA

View Full Version : Exit Popup For .php



Bklyn1957
07 Dec 2007, 05:18 PM
Hi All,
My site is basiclally in .php.
Most of it was made with a software program.
I own an article directory and would like to get an exit popup program for my website.
My web address is: [link removed]
Please visit the site and tell me what you think,ok?
Thanks.

alvo
07 Dec 2007, 06:35 PM
You're new here, so let me remind you about some rules. First is, new members don't get to put links in their posts. There are exceptions, for instance if you are asking for a site review, then obviously a link is required. They are also permitted if the link is necessary to answer a question (such as, "why is there a big blank space on the right of my page?"). Other than that, you have to post 25 times (starting a topic or replying to one) and then links are permitted, and you can also add a signature to your posts with a link it that as well. This is to prevent spamming by people that come by with the goal of posting links. In this case it appears that's not what you're doing, but the link still isn't allowed at this time. However posting the same question more than once is considered spamming, so please don't do that again. Just put it in the category it best fits.

An exit pop up should be done with a client side scripting language such as Javascript and not a server side one like PHP. The reason is simple. When you go to a web page, your browser initiates a connection with the server and sends the request for the page. The server responds and sends the page data and then the connection is closed. This means that the browser and the server have no further communication with each other unless a new request is sent, at which time a new connection is made. Because of this, when you exit a page the server doesn't know it. However you browser will know when you close the window or try to navigate to another URL, and so using a script on the browser side will allow you to detect this action and use that to send a request to the server for the pop up window.

You should be able to find a pre-made script that will do this for you, either at http://hotscripts.com or with a Google search for something like javascript exit popup window.