Targeting links for new windows and parent windows
Support for adding "target" links. This type of link can open an HTML page or another website in a new browser, or can be used for linking into and out of an HTML IFrame.
The following code is a normal link to another webpage:
<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>
New window link inside a menu.js:
Predefined targets are:|
Loads the page into a new browser window.|
Loads the page into the current window.|
Loads the page into the frame that is superior to the frame the hyperlink is in.|
Cancels all frames, and loads in full browser window.|
You can also use any name for a target and it will load a page into a new window.|
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 or footer links from an IFrame:
Some templates include a "footer.htm", "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 HTML page itself:
Default form code may be:
<form action="http://www.google.com/search" target="_top">
For a new window link, change this to:
<form action="http://www.google.com/search" target="_blank">
Special cases in some menu.js files:
In some special cases if you have menu or sidebar code like the following:
Edit like this example for a new window link:
Adding a Pop-Up Window