Do you have a question? Post it now! No Registration Necessary. Now with pictures!
- Posted on
November 12, 2007, 5:16 pm
rate this thread
I have a set of valid xhtml pages that a third party web site is
integrating with via an <iframe> in his own page. This retains his own
branding template in the header and footer, with the iframe containing
my pages in the middle of the screen.
When it is time to exit my pages, to take the user back to the third
party web site, I need to direct the browser out of the iframe and to
one of his pages. I leave it at that and his site takes the user from
I use <a target="_parent"... for this. But then my xhtml is invalid
because the target attribute is deprecated!
I don't want to use javasacript to set the window location, because if
So why is target deprecated? Surely target="_parent" is completely
safe and can't be abused by pop ups and the like?
I'm not with the w3c on this. Is there a way of directing a link to
the iframe's parent window without using target and without using
If not then sod the w3c and sod validation - I have functionality to
- AndrÃ© Gillibert
November 12, 2007, 9:27 pm
Re: Anchor target="_parent" in an iframe. I need it!
Bad choice. HTML 4.01 is a better choice than XHTML. XHTML unproperly
served as text/html is ridiculous as it relies on parsing bugs, while
XHTML properly served as application/xhtml+xml doesn't work in IE.
HTML Strict doesn't support frames. That says all.
HTML frameset and transitional support them.
Either you deem that your page and the third party page are part of the
same site or you deem that your page is independent and the third party
page is only a poor way to see your site.
If the former applies, then, it would be perfectly logical to use the same
grammar (X/HTML transitional) than the third party page.
If the latter applies, then, you should ignore the third party site and
not give any link to "exit" your iframe.
Yes, it can be abused by "pop ups"! YOUR site could use it to completely
remove your page, but also the parent page and replace it by an
However, I think it's absolutely irrelevant to the subject.
Did you know that 100% of what's defined in HTML transitional is part of
The W3C lets you to choose to restrict yourself to a subset. You're
permitted to use the full set.
It's true that using frames reduces accessibility.
But, I feel your reasoning is something like
1) I want to have an accessible page.
2) Then, I restrict myself to using an accessible subset of XHTML.
3) However, because of a third party I'm constrained to use the
4) But I want to get the "accessible XHTML strict" logo, because my
intention was to have an accessible page!
That's not logical. Your page isn't accessible, even if it may be the
fault of the third party and not your fault. So, you cannot get the
Fortunately, which logos you get on your site don't matter much. :)
Personally, when I judge the quality of a page, I look at the actual code.
If it's POSH, even a transitional grammar is ok.
Maybe some incredibely perverse way that nobody should ever use.
The only sensible alternatives are:
1) Ignoring this third party.
2) Using HTML transitional.
3) Writing (for internal use) your own document type definition, subset of
HTML transitional restricted to HTML strict + iframes + target, validating
with SP or another SGML validator. This will allow you to stick to a
relatively strict grammar. When releasing the document, publish it as a
HTML transitional document. If your SGML validator is good, you'll be able
to validate against your document type definition and still keep the
document type declaration at the top of your documents refering to the
HTML transitional FPI.
If you've a question that doesn't belong to Usenet, contact me at