New Window Links on Pages, in Menus and in Search Forms

To have a link open in it's own window so people won't be leaving your site, follow these directions:

A normal link looks like this:

<a href="somepage.htm">Link Name</a>

To have the link open in a new window add this:

<a href="somepage.htm" target="_blank">Link Name</a>


Predefined targets are:
_blank
Loads the page into a new browser window.
_self
Loads the page into the current window.
_parent
Loads the page into the frame that is superior to the frame the hyperlink is in.
_top
Cancels all frames, and loads in full browser window.
"name"
You can also use any name for a target and it will load a page into a new window.
EXAMPLE: target="newwindow"


New window link inside a menu.js:
In most cases to add a new target link inside a menu.js just add target="_blank" as outlined above. See below for special menu.js cases.


Sidebar link from an IFrame:
Some Allwebco templates include a "sidebar.htm" or "sidebar-left.htm". Links inside these IFrame pages should use either the blank target above or, a target="_top" like the following.

<a href="somepage.htm" target="_top">Link Name</a>


Link from a parent page into an IFrame:
You can link from the "parent" page that includes an IFrame and have the IFrame change pages. IFrame code should include a "name=" for the IFrame. Call your target using the IFrame name. View the add an IFrame support page.

<a href="somepage.htm" target="Framename">Link Name</a>


For search forms:
Some Allwebco templates use external .js files for the search forms on the link pages, some have the code right on the page.

If your template uses .js files open each search_ .js file and add the following code. If your template has the code on the page you must edit the page itself:

The form code now:
<form action="http://www.google.com/search" name=f target="_top">

Change this to:
<form action="http://www.google.com/search" name=f target="_blank">



Special cases in some menu.js files:
In some special cases if you have menu.js code like the following:

onClick="location.href=\'about.htm\';"

You may need to edit that like this for a new window link:

onClick="javascript:window.open(\'about.htm\');return true;"



New window link in javascript drop menus:
For info on target or new window links in a Javascript drop menu click here.



Related Topics:
Adding a Pop-Up Window


Allwebco Template Support


Allwebco Website Template Support


See Also...
Adding a Pop-Up Window



Allwebco Web Templates
Complete websites with built in scripts.
AllwebcoDesign.com
Business Web Templates
Business Web Templates
Professional business website templates.
AllwebcoDesign.com
Business Web Templates
Business Website Templates
HTML business website template designs.
AllwebcoDesign.com
Web Template Support
Shopping Cart Templates
Professional templates with built-in Paypal.
AllwebcoDesign.com
Web Template Support
What Are Website Templates?
Understanding webpage templates.
AllwebcoDesign.com



Website Template Support
Website Template Support