How to make links open in the sidebar
Use this only where appropriate please (like to show a list of links, etc. etc.) if you did this with all your links, it could get v. v. annoying. LOL!
It’s a very simple piece of code that does this:
<a href=”javascript:void(_search=open(’http://www.somesite.com/PAGE/YOU/WANT/TO/OPEN.htm‘,’_search’))”>
update: also, on the page you have opening in the sidebar… if you want links from that page to open in the main window, either add this inside the A tag:
target=”_main”
or add this insdie the head tags:
<base target=”_main”>
Please note this works for PC IE only.
August 5th, 2002 at 3:12 pm
Woo-hoo… it’s really that easy? Wonderful! Thanks.
August 6th, 2002 at 11:10 am
Is this the info to make the list open in the sidebar on IE? I’m … so confused. I think that’s what it is. Is it?
August 6th, 2002 at 12:48 pm
Woo-hoo… thanks to Jenn and Scripty Goddess, I now have a launchable sidebar of blogging links on my test PHP
August 6th, 2002 at 12:53 pm
I added the sidebar with the target code in the sidebar page’s header, but my links are opening up in the search bar! Should the code be in the main page instead?
August 6th, 2002 at 3:00 pm
Christine - yes. That is what you do to your link to get that link to open up in the side bar. (PC IE only)
Mariann - not sure what you’re doing… so here’s a little sample:
<html>
<head>
<title>YOUR TITLE HERE</title>
<base target=”_main”>
</head>
<body>
YOUR PAGE STUFF HERE. Any links will automatically open up in the main window so all you have to do is this <a href=”http://www.website.com”>link</a>
</body>
</html>
August 27th, 2002 at 9:10 pm
would the link have no response if someone were to click on it using a mac or a browser other than IE?
i know i’m a month behind the times but i hope it’s not too late to get a response.
April 14th, 2004 at 4:23 pm
This link would not have any effect in, say, Mozilla Firefox. However, all of the links in a sidebar page for IE maide like this will open correctly in Mozilla.
To add a sidebar page in Mozilla Firfox, add it to your favorites, and then make sure you check the box to say to open the link in the sidebar.
July 28th, 2004 at 6:05 am
Yes, TARGET=_main works for links, but I would like to know is there a way to get a handle of _main window via JavaScript. I would like to display main URL, something like:
alert(”Your URL is” + _main.location.href)
Is there a way to do this via JS?