Velocity Reviews - Computer Hardware Reviews

Velocity Reviews > Newsgroups > Programming > HTML > IFrame validation

Reply
Thread Tools

IFrame validation

 
 
shapper
Guest
Posts: n/a
 
      10-13-2009
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
 
Reply With Quote
 
 
 
 
shapper
Guest
Posts: n/a
 
      10-13-2009
Hello,

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

I think Object is the way to go ...

With Object I was able to reduce the error with the HTML tag.
Bu I still have errors with the data string.

Could someone, please, help me with this?

Thanks,
Miguel



 
Reply With Quote
 
 
 
 
Jan C. Faerber
Guest
Posts: n/a
 
      10-13-2009
On Oct 13, 6:35*pm, shapper <(E-Mail Removed)> 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
 
Reply With Quote
 
Jukka K. Korpela
Guest
Posts: n/a
 
      10-13-2009
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/

 
Reply With Quote
 
shapper
Guest
Posts: n/a
 
      10-13-2009
On Oct 13, 6:44*pm, "Jukka K. Korpela" <(E-Mail Removed)> 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.


 
Reply With Quote
 
dorayme
Guest
Posts: n/a
 
      10-13-2009
In article
<(E-Mail Removed)>,
shapper <(E-Mail Removed)> 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
 
Reply With Quote
 
Neredbojias
Guest
Posts: n/a
 
      10-14-2009
On 13 Oct 2009, shapper <(E-Mail Removed)> wrote:

> 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.


No problemo. Just use a javascript document.write for the whole iframe
and it'll pass the validator with flying colors! (Your conscience, of
course, is your own concern.)

--
Neredbojias
http://www.neredbojias.org/
http://www.neredbojias.net/
 
Reply With Quote
 
Andy Dingley
Guest
Posts: n/a
 
      10-14-2009
On 13 Oct, 17:35, shapper <(E-Mail Removed)> 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.
 
Reply With Quote
 
Jukka K. Korpela
Guest
Posts: n/a
 
      10-14-2009
shapper wrote:

> On Oct 13, 6:44 pm, "Jukka K. Korpela" <(E-Mail Removed)> 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/

 
Reply With Quote
 
Travis Newbury
Guest
Posts: n/a
 
      10-14-2009
On Oct 13, 12:35*pm, shapper <(E-Mail Removed)> 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 **** 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 **** if your page does.
 
Reply With Quote
 
 
 
Reply

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
form have 2 iframe.problem to input text in other iframe elca Python 0 10-21-2009 10:00 AM
how to use an iframe as a link (make the whole iframe clickable) mi HTML 4 05-21-2008 10:13 PM
Targeting a parent iframe from a sub-iframe albanitus@yahoo.com HTML 0 11-15-2006 04:40 PM
IFRAME - Refresh Table on Parent Window - maintain IFRAME State Scott ASP General 6 04-14-2004 05:48 AM
Get form values from iframe (1) to iframe (2) inside a layer in iframe (1) Daedalous Javascript 3 01-16-2004 11:08 AM



Advertisments