target frame  | |
April 27th, 2004, 10:42 AM
|
#1 (permalink)
| | Registered User
Join Date: Oct 2001
Posts: 4,097
|
Is there a way to have all external links open in a new window, and all links of the home domain to open in _self ?
at the moment i have a page where all links are opened in a new window due to this tag that i am using:
<base target="_blank">
can this be modified? |
| |
April 27th, 2004, 11:08 AM
|
#2 (permalink)
| | Supporting our military
Join Date: Oct 2002 Location: Bottom left of U.S.
Posts: 9,197
|
Wouldn't just dropping the target="_blank" accomplish that?
Bill |
| |
April 27th, 2004, 11:45 AM
|
#3 (permalink)
| | Registered User
Join Date: Oct 2001
Posts: 4,097
|
If I drop target blank then all links will open in the same window, even external ones? |
| |
April 27th, 2004, 12:06 PM
|
#4 (permalink)
| | Supporting our military
Join Date: Oct 2002 Location: Bottom left of U.S.
Posts: 9,197
|
On "my" home page all of my links open in a new window with the exception of Hardware Links which opens in the same window.
I just dropped the "blank" tag on that one.
So I would assume that external links would do the same thing. http://members.cox.net/ihategates/mylinks.html
Bill |
| |
April 27th, 2004, 02:49 PM
|
#5 (permalink)
| | Registered User
Join Date: Oct 2001
Posts: 4,097
|
I just had a look at the source of your page, in your case each link has it's own individual tag to specify which target frame to open in.
On the other hand what I am looking for is some html code that automatically checks to see if a link is on the home domain or external and then either allows it to open in the _self frame or _blank
In other words, the tag I posted in my first post is not placed in each link, it resides in the <head></head> section. |
| |
April 27th, 2004, 02:51 PM
|
#6 (permalink)
| | Registered User
Join Date: Oct 2001
Posts: 4,097
|
if there is a way to do it with css perhaps please let me know. |
| |
April 27th, 2004, 02:54 PM
|
#7 (permalink)
| | Supporting our military
Join Date: Oct 2002 Location: Bottom left of U.S.
Posts: 9,197
|
I was wondering if I understood what you were asking.
Obviously not.
Maybe someone at HTML Forums can help you out.
Bill |
| |
April 27th, 2004, 05:48 PM
|
#8 (permalink)
| | ph34r t3h g04t
Join Date: Oct 2001 Location: Kingsford, MI
Posts: 19,595
|
As far as I know, you can't do what you want without scripting, CM. Most people just use target="_blank" in the links they want to be new pages. If you have more new page links than not, you could do base target="_blank" and then do target="_self" in the links you want native.
Otherwise I think you'd have to do some sort of funky programming that would be more time and effort than just using the target switch. |
| | | Thread Tools | Search this Thread | | | | |
Currently Active Users Viewing This Thread: 1 (0 members and 1 guests) | | | | Most Active Discussions | | | | | Recent Discussions  | | | | | |