View Full Version : Target=window. Need help
04-05-1999, 12:20 PM
I've received a complaint that links "don't work" and "nothing happens" when a visitor clicks on links on one of my pages. He says he's using MSIE 4.
I'm using the "target=window" instruction in most of the links to open up a new browser when they are clicked on, like this:
<A HREF="http://www.whatever.com" target=window>Click here</A>
The page is http://www.AssociatePrograms.com/favourite.html
This has me worried. I've had some of these links up for months, and if all the MSIE 4 users find they work, that's a serious problem.
Hope you can help.
04-05-1999, 12:22 PM
Whoops! Typo in that last sentence. It should have said "find they WON'T work".
04-05-1999, 03:00 PM
I just checked numbers 1 and 2 on said page with IE 4.x and they work fine.
If you don't have IE on your system you really should. It's not an issue of your or my preference it's about testing. On a stable ( http://www.very-cool-stuff.com/ubb/biggrin.gif) Win machine I run them both at the same time to check stuff.
HTH and plese visit us often.
04-05-1999, 03:46 PM
I've just been told that some browsers have trouble with target=window and I ought to change the instruction to target=new to solve the problem.
Anyone know about that?
04-05-1999, 04:40 PM
Target=new opens the linked page in a new window.
04-05-1999, 07:18 PM
RE:I've received a complaint that links "don't work" and "nothing happens" when a
visitor clicks on links on one of my pages. He says he's using MSIE 4.
Welcome to the forum!
If I may share a personal experience, I also have a new browser open with certain links from my page (using TARGET="new"), and I've seen first hand where a student will have two or more browser windows open. The "new" window is opening in one of the browser windows that is "behind" the window they currently have open. The person sits there staring at the link they just clicked on, unaware that the new window has opened in another window previously occupied by something else.
FWIW, I tested your site on Netscape 4.X, and MS IE 4.X, and it worked ok!
04-05-1999, 07:31 PM
Thanks, but I'm still not sure which is better to use: target=window or target=new.
Or, because of the problem you described, none?
04-05-1999, 08:43 PM
I have always used <TARGET="new">
I scanned the HTML specs at w3c.org until my eyes bugged out, and I couldn't find any reference to either TARGET="new" or TARGET="window"
To confuse you even more I found this definition in html 4.0, and used it <Target=
"_blank">, yes it worked:
"The following target names are reserved and have special meanings.
The user agent should load the designated document in a new, unnamed window"
04-05-1999, 08:52 PM
FYI frontpage98 inserts _blank command : )
who knows which is correct ?? : )
Good luck !
04-05-1999, 09:17 PM
The answer is, it doesn't matter.
This is probably more than most folks care to know, but, according to the w3c spec:
The following target names are reserved and have special meanings:
If any target attribute refers to an unknown frame F, the user agent should create a new window and frame, assign the name F to the frame, and load the resource designated by the element in the new frame.
The short answer is, target="whatever" will create a new window.
Good night .....zzzzzzzzzzz
04-06-1999, 09:38 AM
THE PROBLEM IS WITH THE BROWSER...
I've had the exact same problem with IE4. There are two symptoms
1. Can't open new windows regardless of what you put with TARGET=
2. Click on a link and nothing happens. However if you right-click the popup menu shows, and you can open in a new window (but not the same one).
It seems to have (very) occassionally after a system crash during surfing. The problem went away for me after a clear cache and hard-reset.
Yes I've had this more than once...but only very occassionally.
04-12-1999, 04:08 PM
In response to Questy - not all "target" comands open a new window (examples: "top", "bottom")
target="window" does not always work on older browsers, and some "off-brands"
AFAIK target="blank" works on most, but on a few will just blank the page in the current browser.
I generally use target="new" - it will launch a new window. Also, it will only launch behind if there is activity on the main page (such as a java banner). Otherwise, it will launch in front (on all browsers I've seen, anyway).
--->Dr. Dennis Mintun, CEO
The Royal Den Publishing Corporation
04-12-1999, 05:55 PM
Welcome to the forum.
The definitions I quoted were based on the W3C HTML 4.0 spec.
The only 4 target names that, according to the W3C HTML 4.0 Spec that have a special meaning are:
If one of these "special" names is not used, again according to the 3WC spec:
"If any target attribute refers to an unknown frame F, the user agent should create a new window and frame, assign the name F to the frame, and load the resource designated by the element in the new frame."
I searched the 3WC site for HTML 2.0 and HTML 3.2 Spec and could not find any reference to target="new". I have used it myself, and honestly can't say where I learned from. If anyone can find an HTML spec that actually defines a target="new" attribute, let me know.
RE: "target="window" does not always work on older browsers, and some "off-brands"
I think it is very important for any web designer to realize that any "activity" whether it be Java, or Java Script, or opening a new window, will vary from browser to browser, and they should be prepared for various results.
While HTML 4.0 is the current standard, it is important to test any site you build in both Netscape 4.x and MS IE 4.X, going back any further than that is up to the individual, but at least test your findings in both flavors of the current browsers.
The whole purpose of the "target" was due to the introduction of frames. Here again, frames are not always supported by older browsers and off brands. For those in the crowd not "into" HTML standards, I can only think of Edwin's quote, "your mileage may vary."
vBulletin® v3.7.4, Copyright ©2000-2015, Jelsoft Enterprises Ltd.