[thelist] XHTML 1.0 Strict -no target attribute allowed?

Rick den Haan rick at countryexpress.nl
Sat Oct 23 07:23:20 CDT 2004

> On a slightly different note, what about for people with no 
> javascript, but with frames?

That's been bugging me as well. The CSS-Frame trick is pretty complicated to
learn, so in those rare occasions I really do need frames I tend to use the
HTML 4.01 Frameset doctype that calls valid XHTML 1.0 Strict or XHTML 1.1
frames. To imitate target="RightFrame" I use a modified version of the

<a href="http://www.example.com/"
onclick="parent.frames.RightFrame.location=this.href; return

Of course, this won't work without javascript. What you *could* do is
something like this:

<script type="text/javascript">
  document.write('<a href="http://www.example.com/"
onclick="parent.frames.RightFrame.location=this.href; return
  <a href="http://www.example.com/" target="RightFrame">Example</a>

But that would be cheating and I don't think the W3C Validator will allow
it. My guess is, if you really want to use frames and targets without
javascript, stick to HTML 4...


More information about the thelist mailing list