Open All Outside Links in a New Window - A script that works on all outside links in a page?

They have: 21 posts

Joined: Jun 1999

How do I open all the outside links on my page in a new browser window but local links in the existing window? I know about the script that works with each individual link (from JavascriptCity and Javascript.Internet.com), but on one of my pages I've got lots of outside links (the "Legal Resources" page on my site). Do I have to "configure" each one of them or is there a better/easier way?

Thanks.

They have: 35 posts

Joined: Mar 1999

You could add "base target=_blank" between your head tags and then configure local links individually. Would this help?

They have: 21 posts

Joined: Jun 1999

Yes, that's great. Uh, but would you mind explaining to me how to configure each local link? Pardon the lame question.

Thanks.

They have: 35 posts

Joined: Mar 1999

Put 'base target=_blank' in the head and put 'target=_self' in the anchor tags for local links that you want to load in the same frame.

They have: 21 posts

Joined: Jun 1999

Thanks, Woody. You've solved my problem!

http://cyberlaw.8m.com

Want to join the discussion? Create an account or log in if you already have one. Joining is fast, free and painless! We’ll even whisk you back here when you’ve finished.