Forum Moderators: open

Message Too Old, No Replies

Replacing IFRAME

         

Yamaha_R1

2:26 pm on Jul 11, 2005 (gmt 0)

10+ Year Member



Amazon associates program uses IFRAME for most ad blocks.

But some of my sites are XHTML and HTML strict, and IFRAME doesn't validate.

How can I replace that with a DIV or other valid element, and still use "src=....." to fill the frame?

encyclo

2:49 pm on Jul 11, 2005 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



You can attempt to replace the
iframe
with the
object
element, however
object
support accross browsers is generally poor. I would not risk it in this case, not least for the reason that you don't want to lose revenue because an ad doesn't display!

You have two options: the first is to continue using strict doctypes and merely ignore the error about unrecognized

iframe
(this will have no influence whatsoever of the browser's ability to parse the page), or to switch to transitional doctypes to remain valid.