IFrame validation

Discussion in 'HTML' started by shapper, Oct 13, 2009.

  1. shapper

    shapper Guest

    Hello,

    I am working on a web site with XHTML Strict.

    On one page I need to use Google Docs Viewer:
    https://docs.google.com/viewer

    Which is used with the code:
    <iframe src="http://docs.google.com/viewer?url=http%3A%2F
    %2Fwww.mydomain.com%2Ftest.pdf&embedded=true" width="600" height="780"
    style="border: none;"></iframe>

    This won't validate.

    Is it possible to have this validated?

    Thanks,
    Miguel
    shapper, Oct 13, 2009
    #1
    1. Advertising

  2. shapper

    shapper Guest

    shapper, Oct 13, 2009
    #2
    1. Advertising

  3. On Oct 13, 6:35 pm, shapper <> wrote:
    > Hello,
    >
    > I am working on a web site with XHTML Strict.
    >
    > On one page I need to use Google Docs Viewer:https://docs.google.com/viewer
    >
    > Which is used with the code:
    > <iframe src="http://docs.google.com/viewer?url=http%3A%2F
    > %2Fwww.mydomain.com%2Ftest.pdf&embedded=true" width="600" height="780"
    > style="border: none;"></iframe>
    >
    > This won't validate.
    >
    > Is it possible to have this validated?


    Yes - for US$ 217,-
    https://www.psd2html.com/order-now.html
    Jan C. Faerber, Oct 13, 2009
    #3
  4. shapper wrote:

    > I created two online examples. One with IFrame and the other with
    > Object:
    > http://flyonpages.flyondreams.pt/DocIFrame.html
    > http://flyonpages.flyondreams.pt/DocObject.html


    Neither of them shows anything useful on my IE 8 - just an icon of a broken
    object.

    > I think Object is the way to go ...


    Why? Iframe has had browser support much longer. What do you expect to
    achieve by using Object instead?

    > With Object I was able to reduce the error with the HTML tag.


    That's just a matter of doctype. The Strict doctypes don't contain Iframe.
    The validator reports problems a bit oddly: it first complains about an
    attribute of the Iframe element, then some messages later that the Iframe
    element itself is not defined at all in the document type definition.

    > Bu I still have errors with the data string.


    You have errors with ampersands. Any "&" character that does being an entity
    reference or a character reference should be represented as "&amp;" (and
    _must_, by the syntax rules, be represented that way or in some equivalent
    way when followed by a letter).

    --
    Yucca, http://www.cs.tut.fi/~jkorpela/
    Jukka K. Korpela, Oct 13, 2009
    #4
  5. shapper

    shapper Guest

    On Oct 13, 6:44 pm, "Jukka K. Korpela" <> wrote:
    > Neither of them shows anything useful on my IE 8 - just an icon of a broken
    > object.


    Go to your IE8 options and add http://docs.google.com to trusted web
    sites

    > Why? Iframe has had browser support much longer. What do you expect to
    > achieve by using Object instead?


    Because it seems that it validates in XHTML strict ... not?

    >
    > You have errors with ampersands. Any "&" character that does being an entity
    > reference or a character reference should be represented as "&amp;" (and
    > _must_, by the syntax rules, be represented that way or in some equivalent
    > way when followed by a letter).


    Yes, I had correct that on my web project but I forgot it on the
    example I posted online.
    So I have the following:
    http://flyonpages.flyondreams.pt/DocIFrame.html

    It validates ... under XHTML transitional ...
    I just wanted to be able to use strict ... but well.
    shapper, Oct 13, 2009
    #5
  6. shapper

    dorayme Guest

    In article
    <>,
    shapper <> wrote:

    > I just wanted to be able to use strict ... but well.


    So use Strict and have it invalid. What do you think will happen? The
    American troops in Afghanistan will still be there, the society will
    still be dominated and distorted by very corrupt men. Or use
    Transitional HTML 4 to salve your conscience. It will not matter at all
    for anything you are likely doing. What you should be doing is cooking
    for me but I seem quite unable to make you do this?

    --
    dorayme
    dorayme, Oct 14, 2009
    #6
  7. shapper

    Neredbojias Guest

    Neredbojias, Oct 14, 2009
    #7
  8. shapper

    Andy Dingley Guest

    On 13 Oct, 17:35, shapper <> wrote:
    > Hello,
    >
    > I am working on a web site with XHTML Strict.


    You're not, you're working with XHTML Transitional, because you're
    using <iframe> in it.
    You've just mislabelled it.

    Best option is probably to use XHTML Transitional markup (with
    <iframe>), use that doctype, use a doctype declaration that gives
    Standards mode rendering, and have prose project standards that say
    "use <iframe>, but don't use <font>" with search regexes to back this
    up.

    There's nothing _wrong_ with using Transitional doctypes. It doesn't
    make you less of a web developer.
    Andy Dingley, Oct 14, 2009
    #8
  9. shapper wrote:

    > On Oct 13, 6:44 pm, "Jukka K. Korpela" <> wrote:
    >> Neither of them shows anything useful on my IE 8 - just an icon of a
    >> broken object.

    >
    > Go to your IE8 options and add http://docs.google.com to trusted web
    > sites


    I cannot - I see "Controlled by company IT". Well, I might. There are lots
    of people who can't change their browser's security settings - at work at
    least. Whether this matters in your case depends on what you are doing and
    for whom (yourself? your family? your company's intranet? the world).

    And I don't know what the problem was really about - your page
    http://flyonpages.flyondreams.pt/DocIFrame.html
    now shows something even on IE 8.

    Anyway, I don't see what you are up to. Viewing a PDF document as forced
    into an inline frame and rendered via a primitive viewer (selected by the
    author, not the user) is close to a usability and accessibility nightmare.

    >> Why? Iframe has had browser support much longer. What do you expect
    >> to achieve by using Object instead?

    >
    > Because it seems that it validates in XHTML strict ... not?


    It does, but why would that matter?

    --
    Yucca, http://www.cs.tut.fi/~jkorpela/
    Jukka K. Korpela, Oct 14, 2009
    #9
  10. On Oct 13, 12:35 pm, shapper <> wrote:
    > Is it possible to have this validated?


    The validator is a TOOL to help you solve issues NOT a goal.
    Thousands/millions of non-validating website work perfectly well in
    all browsers.

    If something is not displaying the way you think it should, use the
    validator to help you correct your problems. If the page works as
    expected, who gives a shit if the validator says the Iframe is not
    supported (or what ever)

    Tool, not goal. Truth is, none of your visitors know what validation
    is, or give a shit if your page does.
    Travis Newbury, Oct 14, 2009
    #10
  11. shapper

    dorayme Guest

    In article
    <>,
    Travis Newbury <> wrote:

    > On Oct 13, 12:35 pm, shapper <> wrote:
    > > Is it possible to have this validated?

    >
    > The validator is a TOOL to help you solve issues NOT a goal.
    > Thousands/millions of non-validating website work perfectly well in
    > all browsers.
    >
    > If something is not displaying the way you think it should, use the
    > validator to help you correct your problems. If the page works as
    > expected, who gives a shit if the validator says the Iframe is not
    > supported (or what ever)
    >
    > Tool, not goal. Truth is, none of your visitors know what validation
    > is, or give a shit if your page does.


    Well said, the public out there have no idea at all what goes on in the
    kitchen. They care only about how it affects them. When the tester guy
    (some illegal immigrant illegally and cruelly hired by the management to
    taste the food) does *not* die on the spot and the cook wipes the gravy
    off the edges of the plate with his hanky before the waiter grabs it to
    take through the swinging door to the diners...

    --
    dorayme
    dorayme, Oct 14, 2009
    #11
    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:
    677
  2. mi
    Replies:
    4
    Views:
    13,522
    dorayme
    May 21, 2008
  3. elca
    Replies:
    0
    Views:
    570
  4. Scott
    Replies:
    6
    Views:
    930
    [MSFT]
    Apr 14, 2004
  5. Daedalous
    Replies:
    3
    Views:
    678
    Daedalous
    Jan 16, 2004
Loading...

Share This Page