How to make links to open in a target frame
To make links in a web page to open in a target frame or new window all you need is to add target=”_blank” in between the <a href=”***”> section of the html code, where *** is the default target frame.
target=”_blank” Opens a page in new window
target=”_self” Opens a page in the same frame
target=”_top” Opens a page in the top page breaking all frames
target=”_parent” Opens a page in parent frame
We can also use target=”frame or iframe’s name” to make the link to open in that frame or iframe.
To make links to open in a target frame or new window by default add <base target=”***”> in between the <head> section of the code. This also works for Blogger’s templates, for Blogger Beta’s templates since it had to be XML compliant you have to add the closing tag </base> at the end to <base target=”***”> to make it work.
Comments
4 Comments on How to make links to open in a target frame
-
onemargaret on Sat, 16th Sep 2006 1:08 am
I like your site. It has a lot of valuable information. I am relatively new to this blog thing. Please visit my site and give me so suggestions. I could use them. I really would appreciate it. Have a nice weekend.
-
Deathwinger on Thu, 19th Jul 2007 6:42 pm
Hey, is there a way to make a hyperlink open two different pages in two seperate iframes?
Like say I one frame was to show a title like GRAPHIC ART (title.htm) and the other was the body of that (body.htm), is it possible if I had a third frame that was a navigation menu and when I clicked on GRAPHIC ART link in that frame it would open the requested pages on the other two frames?
-
rhymes on Fri, 5th Oct 2007 12:16 am
I have some problems with the target links. I have a html page with 3 frames (left, top, and main), my navigation is on the topframe which I created in flash. When I click the button instead of going to the targeted link, it goes to another link. What happened? Can anyone help me plz?
-
QA on Fri, 11th Jan 2008 4:26 pm
I made a page with frames. Generally I try to avoid doing so, but it was the only thing that made sense in this case. To the point:
The main frame contains two sub-frames: a menu frame, and a content frame. After creating these I realized they would not be centered if viewed on a large monitor, so I threw the whole frameset into an iframe and centered the iframe. Looks great on Safari, but FireFox seems to now disregard targets and open links in new tabs instead of the specified frame. What gives?
Tell me what you're thinking...
and oh, if you want a pic to show with your comment, go get a gravatar!



