scriptygoddess

05 Aug, 2002

How to make links open in the sidebar

Posted by: Jennifer In: How to's

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.

Related posts:

  1. Anchor Links in WordPress Posts – another shortcode solution I was recently asked by a client how they could...
  2. swfobject – flash doesn't load in Firefox Ran into a bizarre problem today using swfobject. A lot...

Related posts brought to you by Yet Another Related Posts Plugin.

8 Responses to "How to make links open in the sidebar"

1 | Getsutora

April 14th, 2004 at 4:23 pm

Avatar

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.

2 | M@ri@nn's Pl@ce

August 6th, 2002 at 12:48 pm

Avatar

Sidebar Launch
Woo-hoo… thanks to Jenn and Scripty Goddess, I now have a launchable sidebar of blogging links on my test PHP

3 | Jennifer

August 6th, 2002 at 3:00 pm

Avatar

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>

4 | julie

August 27th, 2002 at 9:10 pm

Avatar

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.

5 | Mariann

August 5th, 2002 at 3:12 pm

Avatar

Woo-hoo… it's really that easy? Wonderful! Thanks. :)

6 | Christine

August 6th, 2002 at 11:10 am

Avatar

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?

7 | Mariann

August 6th, 2002 at 12:53 pm

Avatar

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?

8 | dalibor

July 28th, 2004 at 6:05 am

Avatar

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?

Featured Sponsors

About


Advertisements