View Full Version : Replacing "target" (for frames) - possible ?

05-21-2007, 01:14 AM
Hi, I'd like to validate my pages 4.01 strict and my frame page fails here, because the "target" tag will not validate (it's deprecated even).

I have a page where at the left is the left frame with thumbnails, nice to scroll down. When you click on a thumbnail the right frame shows the big version of the picture.

When I use the loose DTD it's all fine, but I'm afraid that I build on non-future proof grounds...

Here's the code in question (from the left frame page)

<a href="mediapage-01.php" target="mainFrame"><img src="thumb-01.jpg" alt="" width="94" height="60"></a>

I heard of JavaScript replacements for "target" but that's only of use for opening full browser windows. Here I'm lost.

Are there no such pages possible like the one I described above, in the future ?? I need a vertical scroll bar for the left frame...

Thank you,


PS: I know of the problems with frames to begin with (search engines, bookmarking, etc) but in my case it's just a small popup window.

05-21-2007, 01:26 AM
Frames themselves are essentially deprecated. If you want to use the target attribute, you use the Transitional DTD.

There are JavaScript methods for “getting around” this restraint. The first uses JavaScript to insert the target attribute; it essentially exploits validator limitations so that you can call your document valid when it is not. I believe that the other requires use of the non‐standard window object.

If you just want scrollbars for visual effect, you can get them by using the CSS overflow property.