Click to See Complete Forum and Search --> : "target" attribute in hyperlinks???


stampman
03-18-2003, 11:54 AM
I am running an old 'sour' web site which is built on frames. :o

I have through the time collected a huge pile of links to sites in the same interest area, that I wish to place on the site.

If I don't use the attribute target="xx" in the a href hyperlink, the new page will load up in my own frameset.

So I have to insert the attribute in all the tags (hundreds and hundreds), otherwise it will be confusing.

Now I wonder if there exist any javascript I could use, instead of having to do that huge job - a java script that tell the same thing for all links that I will put on my 'hot links' page.

:confused:

pyro
03-18-2003, 12:00 PM
Actually, you can do it with plain HTML. Add this in your <head> tag:

<base target="framename">

stampman
03-18-2003, 01:26 PM
Does this also mean that I can override the head tag (if there still is a hyperlink on the page leading to a page inside the site that has to be shown within the frameset) by using for instance the attribute target within the hyperlink?

pyro
03-18-2003, 01:45 PM
Yes, a target inside of the <a href...> will override the base target...

stampman
03-18-2003, 02:23 PM
Thank you!
I will try it now. If I run in to problems, may I contact you again?
I have placed you in my buddies list.

pyro
03-18-2003, 03:47 PM
Sure, no problem. Let me know how it goes.