Adding an additional pop-up window

Let's say you want one of your HTML pages to open as a pop-up and not as a regular linked page. For example on an F.A.Q. page. Use the code shown below to do this:


Step #1:
First, click here to download the .zip file with the .js pop-up file and also the sample pop-up page. Put these files in your website directory. They should not overwite any existing files.

Step #2:
Select, copy, and add the following code to the head area just before the </head> of any HTML page you want to be able to open the pop-ups. (the .zip file includes a sample page)


<script language="JavaScript" type="text/javascript" src="pop-up.js"></script>


Step #3:
Select, copy, and paste the following code to your html page where you want links for the pop-up to pop-up from.


<a href="javascript:popcontact('pop-up.htm')">Link or graphic here</a>


Step #4:
Edit your pop-up.htm pages with your own info, links and images. These are treated as normal HTML pages for editing.


Adding the popup link to a menu.js or other .js file:
If you are adding this popup link to a menu.js or other .js file, you will add a \ in front of every ' in your link. Here is an example:

<a href="javascript:popcontact(\'pop-up.htm\')">Link Name</a>

In the above we have added two \ like the following: \'pop-up.htm\'


Adding extra pop-ups:
You can have many pop-ups on one page. Edit the "pop-up.htm" in the code below for additional pages and copy the "pop-up.htm" and give it the name you edited the link with. Make sure the names match exactly, hosting is case sensitive. Second pop-up link example:


<a href="javascript:popcontact('pop-up-2.htm')">Link or graphic here</a>


NOTE: Only edit the area in red for the second pop-up. Make sure you create a page called "pop-up-2.htm" for the above example.



Related Topics:
Open in a new window, target links


Allwebco Template Support


Allwebco Template Adding New a Popup Window


See Also...
Target Links
Scripts & Add-ons



Allwebco Web Templates
Complete websites with built in scripts.
AllwebcoDesign.com
Web Template Support
Free Javascripts
Free scripts for any website or template.
Allwebco-Templates
Web Template Support
SE Optimization
Help to list better in search engines.
Allwebco-Templates
Web Template Support
Shopping Cart Templates
Professional templates with built-in Paypal.
AllwebcoDesign.com



Website Template Support
Website Template Support