iframe validation issues

Discussion in 'HTML' started by Saber, Jan 12, 2009.

  1. Saber

    Saber Guest

    Hey all, I cannot get a page I am working on to validate so I was
    wondering if I can get any help here. As the subject says, it is with
    the iframe tag. (I am using 4.01 Strict) It's actually the iframe that
    google gives you to embed a map on your page. I fixed a couple of
    errors by making a css entry for it (like width, height, scrolling,
    margin). But, the validator does not like id withing the iframe tag.
    It also doesn't like src and it doesn't like a > saying that "element
    "IFRAME" undefined".
    This is the offending text: (I wrapped it manually so that its not a
    PITA to display in this post, but on the page it is not split up.)
    <iframe id="mapFrame"
    src="http://maps.google.com/maps?f=q&amp;hl=en&amp;geocode=&amp;q=28+Industrial+
    Blvd.,+Ste.+B,+Medford,+New+York+11763&amp;sll=37.0625,-95.677068&amp;sspn=45.688
    268,69.082031&amp;ie=UTF8&amp;z=14&amp;iwloc=cent&amp;ll=40.819461,-72.95557&amp;
    output=embed&amp;s=AARTsJp_cI0o6gQRP7AbqCui7aMd0RsIdw"></iframe>

    The errors are:
    Line 37, Column 26: there is no attribute "ID".
    <p><iframe id="mapFrame"
    src="http://maps.google.com/maps?f=q&amp;hl

    Line 37, Column 41: there is no attribute "SRC".
    <p><iframe id="mapFrame"
    src="http://maps.google.com/maps?f=q&amp;hl=

    Line 37, Column 333: element "IFRAME" undefined.
    …s=AARTsJp_cI0o6gQRP7AbqCui7aMd0RsIdw"></iframe><br><small><a
    href="http://map

    Is there anyway to make this work or do I have to go to Transitional?
    TIA

    --
    Saber
    Saber, Jan 12, 2009
    #1
    1. Advertising

  2. Saber wrote:

    > Hey all, I cannot get a page I am working on to validate so I was
    > wondering if I can get any help here. As the subject says, it is with
    > the iframe tag. (I am using 4.01 Strict) ...


    You would need a frameset doctype ... (that was easy!)

    However, I'd stick with 4.01 Strict and ignore the error for google's
    iframe. None of your visitors will care.

    Certainly, do not switch to Transitional.

    --
    -bts
    -Friends don't let friends drive Windows
    Beauregard T. Shagnasty, Jan 12, 2009
    #2
    1. Advertising

  3. Saber

    Nik Coughlin Guest

    "Saber" <> wrote in message
    news:496ac2c9$0$4891$...
    > Hey all, I cannot get a page I am working on to validate so I was
    > wondering if I can get any help here. As the subject says, it is with the
    > iframe tag. (I am using 4.01 Strict) It's actually the iframe that google
    > gives you to embed a map on your page.


    There's also a way to do it with JavaScript that doesn't need an iframe. As
    Google Maps relies on JavaScript anyway that shouldn't be an issue.

    I think this is the right link:
    http://code.google.com/apis/maps/

    I remember it being very easy to set up
    Nik Coughlin, Jan 12, 2009
    #3
  4. Saber

    richard Guest

    On Sun, 11 Jan 2009 23:10:43 -0500, Saber
    <> wrote:

    >Hey all, I cannot get a page I am working on to validate so I was
    >wondering if I can get any help here. As the subject says, it is with
    >the iframe tag. (I am using 4.01 Strict) It's actually the iframe that
    >google gives you to embed a map on your page. I fixed a couple of
    >errors by making a css entry for it (like width, height, scrolling,
    >margin). But, the validator does not like id withing the iframe tag.
    >It also doesn't like src and it doesn't like a > saying that "element
    >"IFRAME" undefined".




    iframes are not valid in strict, only tranisitional.
    richard, Jan 12, 2009
    #4
  5. richard wrote:

    > Saber wrote:
    >> the iframe tag. ...

    >
    > iframes are not valid in strict, only tranisitional.


    Or Frameset, right?

    --
    -bts
    -Friends don't let friends drive Windows
    Beauregard T. Shagnasty, Jan 12, 2009
    #5
  6. Saber

    dorayme Guest

    In article <>,
    dorayme <> wrote:

    > In article <gkfjc4$b0o$>,
    > "Beauregard T. Shagnasty" <> wrote:
    >
    > > richard wrote:
    > >
    > > > Saber wrote:
    > > >> the iframe tag. ...
    > > >
    > > > iframes are not valid in strict, only tranisitional.

    > >
    > > Or Frameset, right?

    >
    > Not necessarily.
    >
    > <http://dorayme.netweaver.com.au/frames/saber.html>


    Sorry, I read that as "On Frameset". My bad.

    --
    dorayme
    dorayme, Jan 12, 2009
    #6
  7. Saber

    cwdjrxyz Guest

    On Jan 11, 10:10 pm, Saber <> wrote:
    > Hey all, I cannot get a page I am working on to validate so I was
    > wondering if I can get any help here.  As the subject says, it is with
    > the iframe tag.  (I am using 4.01 Strict) It's actually the iframe that
    > google gives you to embed a map on your page.  I fixed a couple of
    > errors by making a css entry for it (like width, height, scrolling,
    > margin).  But, the validator does not like id withing the iframe tag.
    > It also doesn't like src and it doesn't like a > saying that "element
    > "IFRAME" undefined".
    > This is the offending text: (I wrapped it manually so that its not a
    > PITA to display in this post, but on the page it is not split up.)
    > <iframe id="mapFrame"
    > src="http://maps.google.com/maps?f=q&hl=en&geocode=&q=28+Indus....
    > Blvd.,+Ste.+B,+Medford,+New+York+11763&amp;sll=37.0625,-95.677068&amp;sspn=45.688
    > 268,69.082031&amp;ie=UTF8&amp;z=14&amp;iwloc=cent&amp;ll=40.819461,-72.95557&amp;
    > output=embed&amp;s=AARTsJp_cI0o6gQRP7AbqCui7aMd0RsIdw"></iframe>
    >
    > The errors are:
    > Line 37, Column 26: there is no attribute "ID".
    >              <p><iframe id="mapFrame"
    > src="http://maps.google.com/maps?f=q&hl
    >
    > Line 37, Column 41: there is no attribute "SRC".
    >         <p><iframe id="mapFrame"
    > src="http://maps.google.com/maps?f=q&hl=
    >
    > Line 37, Column 333: element "IFRAME" undefined.
    > …s=AARTsJp_cI0o6gQRP7AbqCui7aMd0RsIdw"></iframe><br><small><a
    > href="http://map
    >
    > Is there anyway to make this work or do I have to go to Transitional?



    It will work in most current browsers despite the fact that it is not
    proper html and thus will not validate. Apparently most current
    browsers are designed to work with many versions of html, and often
    code that is not w3c supported in the newer versions of html is let
    through by the loose-as-a-goose html parser. Xhtml, when served
    properly as application/xhtml+xml, is parsed as xml and is extremely
    strict. Even a slight error that would get by when parsed as html
    often results in the pager not being displayed at all, and instead you
    get an error message.

    Frames and iFrames are just methods to embed a page in another page.
    Embed has never been part of w3c html, but rather is a gift of
    Netscape, soon supported by IE, in the browser war era. With w3c html
    4.01, embed is of course not allowed, and instead one is supposed to
    use object code to embed a page in another page. Also frames and
    iFrames started to be phased out, and both are not allowed in any
    strict version of html or xhtml from html 4.01 on. The support, or
    not, of frames and iFrames is slightly different for non strict
    versions of html and xhtml. When you reach xhtml 1.1, which comes in
    only one version, very strict, frames and iFrames are not allowed at
    all.

    This subject comes up in this group fairly often. I will copy a
    portion of my answer in an earlier thread on this subject below.

    ________________________________________________________________________________________________

    Yes, frame sets are supposed to be replaced with object code in html
    4.01 strict, xhtml 1.0 strict and xhtml 1.1 which is of only one kind
    and very strict. The problem is that use of an object code in these
    cases works on most modern browsers, but not on IE browsers. The
    w3schools site long has had an example of a html page embedded in
    another html page, but it will not work on IE browsers. However this
    can be avoided. There is an ActiveX object that can be used to embed a
    html page in another html page. It has been around quite a while and
    the clsid for it has been in the Windows OS registry for a long time.
    However, for some unknown reason, few seem to use it. One can direct
    to the ordinary object needed by most browsers or the ActiveX one
    needed by IE by using Microsoft conditional comments.

    I have a page at http://www.cwdjr.net/video4/embedpage.php to
    illustrate this. It validates as xhtml 1.1 and is served properly as
    mime type application/xhtml+xml which calls in the very strict xml
    parser rather than the loose html parser you get when a xhtml page is
    wrongly served as text/html. You can in fact embed yet another page
    in an embedded page. Some of the embedded media are designed for high
    broadband, but other will work on low broadband or even dial up for
    some of the audio. Since much of the code is in php on the server,
    some of the details will not be apparent from the source code you can
    view. However you can see the ActiveX object with the 32 digit clsid
    for it, the ordinary object, and the way Microsoft conditional
    comments are used.

    ______________________________________________________________________________________________

    The page given above is just a demo to show that use of correct object
    code for embedding pages within other pages is quite possible, even
    for the very severe conditions of xhtml 1.1 and use of complicated
    media code that often is full of errors, even in code written at the
    html 4.01 transitional level. Also note that my example page uses
    header exchange and php on the server to serve the page as html 4.01
    for IE and other browsers that do not support properly served xhtml,
    although most modern browsers other than IE will support xhtml served
    properly.Thus if you view the page using IE, you will find that it is
    coded as html 4.01strict rather than xhtml 1.1.
    cwdjrxyz, Jan 12, 2009
    #7
  8. Saber

    richard Guest

    On Mon, 12 Jan 2009 09:16:36 -0500, "Beauregard T. Shagnasty"
    <> wrote:

    >richard wrote:
    >
    >> Saber wrote:
    >>> the iframe tag. ...

    >>
    >> iframes are not valid in strict, only tranisitional.

    >
    >Or Frameset, right?


    To my understanding, iframe is totally independent of a framset.
    I suppose if one really wanted to totally screw it up, then one could
    embed an iframe within a page that is part of a framset.
    richard, Jan 13, 2009
    #8
  9. richard wrote:

    > "Beauregard T. Shagnasty" wrote:
    >> richard wrote:
    >>> Saber wrote:
    >>>> the iframe tag. ...
    >>>
    >>> iframes are not valid in strict, only tranisitional.

    >>
    >> Or Frameset, right?

    >
    > To my understanding, iframe is totally independent of a framset. I
    > suppose if one really wanted to totally screw it up, then one could
    > embed an iframe within a page that is part of a framset.


    Of course it is independent of a frameset, but it uses the same doctype,
    which was my point.

    --
    -bts
    -Friends don't let friends drive Windows
    Beauregard T. Shagnasty, Jan 13, 2009
    #9
  10. Saber

    richard Guest

    On Mon, 12 Jan 2009 22:15:50 -0500, "Beauregard T. Shagnasty"
    <> wrote:

    >richard wrote:
    >
    >> "Beauregard T. Shagnasty" wrote:
    >>> richard wrote:
    >>>> Saber wrote:
    >>>>> the iframe tag. ...
    >>>>
    >>>> iframes are not valid in strict, only tranisitional.
    >>>
    >>> Or Frameset, right?

    >>
    >> To my understanding, iframe is totally independent of a framset. I
    >> suppose if one really wanted to totally screw it up, then one could
    >> embed an iframe within a page that is part of a framset.

    >
    >Of course it is independent of a frameset, but it uses the same doctype,
    >which was my point.


    frameset is allowed in all doctypes. I tried using iframe in 4.01
    strict and it just would not happen.
    richard, Jan 13, 2009
    #10
  11. richard wrote:

    > "Beauregard T. Shagnasty" wrote:
    >> richard wrote:
    >>> "Beauregard T. Shagnasty" wrote:
    >>>> richard wrote:
    >>>>> Saber wrote:
    >>>>>> the iframe tag. ...
    >>>>>
    >>>>> iframes are not valid in strict, only tranisitional.
    >>>>
    >>>> Or Frameset, right?
    >>>
    >>> To my understanding, iframe is totally independent of a framset. I
    >>> suppose if one really wanted to totally screw it up, then one could
    >>> embed an iframe within a page that is part of a framset.

    >>
    >> Of course it is independent of a frameset, but it uses the same
    >> doctype, which was my point.

    >
    > frameset is allowed in all doctypes.


    No they aren't. Framesets are allowed (where validity is concerned) only
    in a Frameset doctype. Read the specs.

    http://www.w3.org/QA/2002/04/valid-dtd-list.html

    <!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Frameset//EN"
    "http://www.w3.org/TR/html4/frameset.dtd">

    > I tried using iframe in 4.01 strict and it just would not happen.


    Of course not, for the reason I just stated.

    --
    -bts
    -Friends don't let friends drive Windows
    Beauregard T. Shagnasty, Jan 13, 2009
    #11
  12. Saber

    dorayme Guest

    In article <>,
    richard <> wrote:

    > To my understanding, iframe is totally independent of a framset.
    > I suppose if one really wanted to totally screw it up, then one could
    > embed an iframe within a page that is part of a framset.


    Logically speaking, you would not be totally screwing things up because
    the idea of a frameset/frames proper is different to the idea of a
    context/i-frame, they have different purposes. The former is about
    partitioning a page whereas the latter is about popping a box (like an
    image) inline, the box being a special container that can take another
    website page.

    As to how all this goes with what doctypes, the history of it vis a vis
    validation, my impression is that it is all a bit of a stinking mess.

    I agree with you that the purpose of the i-frame can be achieved outside
    the context of a frameset setting and doctype, as in

    <http://dorayme.netweaver.com.au/frames/iFrameTransitional4.01.html>

    But, if its purpose can be realised as above, and if proper frame is for
    dividing a page up into frames into which can be loaded other pages, it
    follows that the two purposes, for real frames and i-frames are entirely
    consistent with each other.

    <http://dorayme.netweaver.com.au/frames/framesetWithFrameWithIframe.html>

    --
    dorayme
    dorayme, Jan 13, 2009
    #12
  13. Saber

    Neredbojias Guest

    On 12 Jan 2009, "Beauregard T. Shagnasty" <>
    wrote:

    > richard wrote:
    >
    >> "Beauregard T. Shagnasty" wrote:
    >>> richard wrote:
    >>>> Saber wrote:
    >>>>> the iframe tag. ...
    >>>>
    >>>> iframes are not valid in strict, only tranisitional.
    >>>
    >>> Or Frameset, right?

    >>
    >> To my understanding, iframe is totally independent of a framset. I
    >> suppose if one really wanted to totally screw it up, then one could
    >> embed an iframe within a page that is part of a framset.

    >
    > Of course it is independent of a frameset, but it uses the same
    > doctype, which was my point.


    I really don't follow this. Iframe is _not_ valid "in Frameset"
    although in can be valid within a framed page if that's what you mean.

    --
    Neredbojias
    http://www.neredbojias.org/
    http://www.neredbojias.net/
    The road to Heaven is paved with bad intentions.
    Neredbojias, Jan 13, 2009
    #13
  14. Neredbojias wrote:

    > "Beauregard T. Shagnasty" wrote:
    >> richard wrote:
    >>> "Beauregard T. Shagnasty" wrote:
    >>>> richard wrote:
    >>>>> Saber wrote:
    >>>>>> the iframe tag. ...
    >>>>>
    >>>>> iframes are not valid in strict, only tranisitional.
    >>>>
    >>>> Or Frameset, right?
    >>>
    >>> To my understanding, iframe is totally independent of a framset. I
    >>> suppose if one really wanted to totally screw it up, then one could
    >>> embed an iframe within a page that is part of a framset.

    >>
    >> Of course it is independent of a frameset, but it uses the same
    >> doctype, which was my point.

    >
    > I really don't follow this. Iframe is _not_ valid "in Frameset"
    > although in can be valid within a framed page if that's what you
    > mean.


    I believe what I am saying is, that using an <iframe> element within a
    Strict doctype page is not valid, per w3c. Using an <iframe> in a
    document that has the Frameset doctype, the <iframe> is not shown as an
    error.

    --
    -bts
    -Friends don't let friends drive Windows
    Beauregard T. Shagnasty, Jan 13, 2009
    #14
  15. Saber

    Neredbojias Guest

    On 13 Jan 2009, "Beauregard T. Shagnasty" <>
    wrote:

    >> Neredbojias wrote:
    >> I really don't follow this. Iframe is _not_ valid "in Frameset"
    >> although in can be valid within a framed page if that's what you
    >> mean.

    >
    > I believe what I am saying is, that using an <iframe> element within
    > a Strict doctype page is not valid, per w3c. Using an <iframe> in a
    > document that has the Frameset doctype, the <iframe> is not shown as
    > an error.


    Okay, but according to the html 4.01 spec, iframe is only valid in
    transitional.

    http://www.w3.org/TR/REC-html40/index/elements.html

    --
    Neredbojias
    http://www.neredbojias.org/
    http://www.neredbojias.net/
    The road to Heaven is paved with bad intentions.
    Neredbojias, Jan 14, 2009
    #15
  16. Neredbojias wrote:

    > On 13 Jan 2009, "Beauregard T. Shagnasty"
    > <> wrote:
    >
    >>> Neredbojias wrote:
    >>> I really don't follow this. Iframe is _not_ valid "in Frameset"
    >>> although in can be valid within a framed page if that's what you
    >>> mean.

    >>
    >> I believe what I am saying is, that using an <iframe> element within
    >> a Strict doctype page is not valid, per w3c. Using an <iframe> in a
    >> document that has the Frameset doctype, the <iframe> is not shown as
    >> an error.

    >
    > Okay, but according to the html 4.01 spec, iframe is only valid in
    > transitional.
    >
    > http://www.w3.org/TR/REC-html40/index/elements.html


    That page is just an informal summary. It is very useful, but in a dispute
    or uncertainty, the formal definitions and normative prose should be
    checked.

    The DTD column there is partly misleading, since some (actually, most)
    elements that have L there should have both L and F. Moreover, the empty
    cells should be read "this element appears in all DTDs", which is not
    immediately obvious from the page.

    The Frameset DTD is just a variant of the Transitional DTD, as you can see
    from
    http://www.w3.org/TR/REC-html40/sgml/framesetdtd.html
    which really says that the DTDs are identical except for
    <!ENTITY % HTML.Frameset "INCLUDE">
    which makes some parts of the Transitional DTD enabled in Frameset variant
    (only).

    In particular, the FRAMESET element may contain the NOFRAMES part (commonly
    used to demonstrate the author's cluelessness, such "This page requires
    frames"), which in turn contains a BODY element, which may contain anything
    that the BODY of a Transitional document may contain. This of course
    includes IFRAME.

    On the other hand, it would be "somewhat" weird to have IFRAME inside an
    element whose content is ignored on any frames-enabled browser. (It is
    remotely possible that some odd browser somewhere has a mode where "normal"
    frames are disabled but inline frames are enabled. I never saw one... but
    actually I think one could easily turn a normal browser into such an oddity,
    by using simple CSS that sets frame { display: none; }. But why?)

    --
    Yucca, http://www.cs.tut.fi/~jkorpela/
    Jukka K. Korpela, Jan 14, 2009
    #16
  17. Neredbojias wrote:

    > "Beauregard T. Shagnasty" wrote:
    >>> Neredbojias wrote: I really don't follow this. Iframe is _not_
    >>> valid "in Frameset" although in can be valid within a framed page
    >>> if that's what you mean.

    >>
    >> I believe what I am saying is, that using an <iframe> element within
    >> a Strict doctype page is not valid, per w3c. Using an <iframe> in a
    >> document that has the Frameset doctype, the <iframe> is not shown as
    >> an error.

    >
    > Okay, but according to the html 4.01 spec, iframe is only valid in
    > transitional.
    >
    > http://www.w3.org/TR/REC-html40/index/elements.html


    What Jukka said. :)

    Earlier, I had futzed with a page on my local server, adding an iframe
    and validating with all the three doctypes. Both a Frameset or a
    Transitional doctype showed no error, but Strict did.

    I don't have a need to use either frames or iframes.

    --
    -bts
    -Friends don't let friends drive Windows
    Beauregard T. Shagnasty, Jan 14, 2009
    #17
  18. Jukka K. Korpela wrote:

    > On the other hand, it would be "somewhat" weird to have IFRAME inside
    > an element whose content is ignored on any frames-enabled browser.
    > (It is remotely possible that some odd browser somewhere has a mode
    > where "normal" frames are disabled but inline frames are enabled. - -


    Actually there is... and it's a not a particularly odd browser: Opera
    (version 9.62) has settings, under content settings > style settings,
    separately options for enabling ("normal") frames and for enabling inline
    frames.

    Using IFRAME in a frameset document is of course still rather odd, but it's
    valid - and an artificial use case might be constructed.

    --
    Yucca, http://www.cs.tut.fi/~jkorpela/
    Jukka K. Korpela, Jan 14, 2009
    #18
  19. Saber

    Saber Guest

    Beauregard T. Shagnasty wrote:
    > Saber wrote:
    >
    >> Hey all, I cannot get a page I am working on to validate so I was
    >> wondering if I can get any help here. As the subject says, it is with
    >> the iframe tag. (I am using 4.01 Strict) ...

    >
    > You would need a frameset doctype ... (that was easy!)
    >
    > However, I'd stick with 4.01 Strict and ignore the error for google's
    > iframe. None of your visitors will care.
    >
    > Certainly, do not switch to Transitional.
    >

    Well, the frameset doctype makes sense. If I leave it as 4.01 Strict,
    that won't effect anyone's viewing the site though, right?
    Thanks

    --
    Saber
    Saber, Jan 15, 2009
    #19
  20. Saber wrote:

    > Beauregard T. Shagnasty wrote:
    >> Saber wrote:
    >>> Hey all, I cannot get a page I am working on to validate so I was
    >>> wondering if I can get any help here. As the subject says, it is
    >>> with the iframe tag. (I am using 4.01 Strict) ...

    >>
    >> You would need a frameset doctype ... (that was easy!)
    >>
    >> However, I'd stick with 4.01 Strict and ignore the error for
    >> google's iframe. None of your visitors will care.
    >>
    >> Certainly, do not switch to Transitional.
    >>

    > Well, the frameset doctype makes sense.


    No, not really. You would only want to use a frameset doctype if you
    were actually using (evil) frames.

    > If I leave it as 4.01 Strict, that won't effect anyone's viewing the
    > site though, right? Thanks


    No, it should not. Just don't put that W3C 'valid' icon on the page.

    --
    -bts
    -Friends don't let friends drive Windows
    Beauregard T. Shagnasty, Jan 15, 2009
    #20
    1. Advertising

Want to reply to this thread or ask your own question?

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. Replies:
    0
    Views:
    661
  2. mi
    Replies:
    4
    Views:
    13,344
    dorayme
    May 21, 2008
  3. elca
    Replies:
    0
    Views:
    553
  4. Scott
    Replies:
    6
    Views:
    909
    [MSFT]
    Apr 14, 2004
  5. Daedalous
    Replies:
    3
    Views:
    651
    Daedalous
    Jan 16, 2004
Loading...

Share This Page