Help - Search - Members - Calendar
Full Version: Pop UP that Runs on Any Landing Page
HTMLHelp Forums > Web Authoring > Markup (HTML, XHTML, XML)
philwinter
Hello, I'm not sure of the correct terminology, but I have a need for a simple way of implementing a pop up or window that appears no matter which page a visitor lands on. I wish to notify visitors that the Web site services are being discontinued, but I don't want to take down the entire site. Any simple way of doing this?
CharlesEF
How are your pages currently served up? Are you using any server side language (PHP, ASP, etc..)? When you say pop-up are you talking about a message that displays over your current page? Or, do you mean an alert message that the user has to click to close? Or, would an area on the page be enough to show your message, you can use CSS to color the background and text.
philwinter
QUOTE(CharlesEF @ Aug 2 2017, 03:54 PM) *

How are your pages currently served up? Are you using any server side language (PHP, ASP, etc..)? When you say pop-up are you talking about a message that displays over your current page? Or, do you mean an alert message that the user has to click to close? Or, would an area on the page be enough to show your message, you can use CSS to color the background and text.


I'm not sure what the server side language is. The site is built on a template platform and I don't have access to the service side. I can, however make changes to the templates. I would prefer a message that appears on top of what ever the landing page happens to be. Thanks!
Christian J
Just make sure you don't obscure the normal page content, or force the visitor to close a new popup for every page on your site that he loads (which would be very annoying).

I'd probably just display a text message at the top of each page.

Another idea might be to let the server check the referrer header, and unless it's from your own site redirect the user to a warning page. This might be done in a .htaccess file, or (more involved) with a server-side script like PHP.



CharlesEF
QUOTE(philwinter @ Aug 2 2017, 03:02 PM) *

I'm not sure what the server side language is. The site is built on a template platform and I don't have access to the service side. I can, however make changes to the templates. I would prefer a message that appears on top of what ever the landing page happens to be. Thanks!

My idea is to place a <div> at the top of each page (or anywhere after the header, if you have one). You can add the <div> to your template but I think you will still need to edit each existing page to add the <div>. Then you need to create an announcement page (a page that contains only your message, you could wrap the message in <p>...</p> tags). Then you use a server-side script, like PHP, to test if the file exists - if it doesn't then you hide the <div> - if it does then you use PHP to insert the file into the <div>. You would use CSS to color the <div> in colors that stand out.

For this to work you need some kind of server-side language. Check with your host provider to find out what server-side languages are supported. You would also need to upload your updated files to your server, which you should be able to do now.
This is a "lo-fi" version of our main content. To view the full version with more information, formatting and images, please click here.
Invision Power Board © 2001-2024 Invision Power Services, Inc.