Forum Moderators: open

Message Too Old, No Replies

xHTML-Strict iFrame Solution

I found this solution that I hope helps

         

Satchownz

10:31 pm on Jul 13, 2008 (gmt 0)

10+ Year Member



I've been reading this board for a long time and wanted to finally contribute. I recent posted about a solution I worked out for the plaguing xHTML-Strict compliant iFrame dilemma.

Basically, you can use jQuery to create and publish SEO-Friendly, valid xHTML 1 Strict iFrame solutions.

Hope it helps out.

Cheers!
-a

[edited by: tedster at 11:29 pm (utc) on July 13, 2008]

tedster

1:52 am on Jul 14, 2008 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



Thanks for the idea. I appreciate that you probably went to a lot of effort to work this out, and those who hold themselves to strict standards will find your idea quite useful.

But it kind of bothers me to require users to have javascript turned on, when no modern browser actually has a problem with the iframe element, even if that mark-up doesn't validate to a strict DTD.

There is other frame-related mark-up (target="_blank" for example) where some authors go through contortions to get the page to validate, when there is no practical problem from the start. I'm all for validating code, but sometimes it all gets pushed a bit too far, in my opinion.

That's especially true when even people within the W3C feel that some of the current standards may not be too well considered. After all, these are called "recommendations" from the W3C, and not absolute laws. HTML was created to be rather fault tolerant, and that has served the entire web quite nicely. HTML is a mark-up language which is a bit different from a scripting language.

[edited by: tedster at 6:41 am (utc) on July 14, 2008]

Satchownz

2:12 am on Jul 14, 2008 (gmt 0)

10+ Year Member



I agree, this is more of a "patch" until a better "official" element is decided on.

By the way, the "target='_blank'" solution is a pretty easy fix using a similar system. Basically read all "a" tags with a certain attribute, such as "rell='external,' and add an "onclick" event with jQuery once the page loads.

I can post the code if you like.