Velocity Reviews - Computer Hardware Reviews

Velocity Reviews > Newsgroups > Programming > Javascript > Serving XHTML documents as XHTML does weird things.

Reply
Thread Tools

Serving XHTML documents as XHTML does weird things.

 
 
-Lost
Guest
Posts: n/a
 
      06-18-2007
In Firefox and Safari for example, if I serve my XHTML documents as
application/xml or xhtml+xml they only display the top inch or so of the
document.

In Opera it says "object has been blocked."

In Internet Explorer of course you get total rubbish. Anything from
"page cannot be loaded" to "403 no permission."

The thing is, I figured the first two at least could handle it, maybe
even Opera. I knew how IE would handle it.

Granted, I know the caveats of using XHTML on the web, but irregardless
I would like to know why it behaves this way.

What makes my XHTML pages render as one to two inch strips across the
top of the browser?

If anyone needs an example page to inspect, let me know.

--
-Lost
Remove the extra words to reply by e-mail. Don't e-mail me. I am
kidding. No I am not.
 
Reply With Quote
 
 
 
 
-Lost
Guest
Posts: n/a
 
      06-18-2007
-Lost wrote:
> In Firefox and Safari for example, if I serve my XHTML documents as
> application/xml or xhtml+xml they only display the top inch or so of the
> document.
>
> In Opera it says "object has been blocked."
>
> In Internet Explorer of course you get total rubbish. Anything from
> "page cannot be loaded" to "403 no permission."
>
> The thing is, I figured the first two at least could handle it, maybe
> even Opera. I knew how IE would handle it.
>
> Granted, I know the caveats of using XHTML on the web, but irregardless
> I would like to know why it behaves this way.
>
> What makes my XHTML pages render as one to two inch strips across the
> top of the browser?
>
> If anyone needs an example page to inspect, let me know.


Ugh, it just dawned on me that this is probably a purely HTML-related
question.

--
-Lost
Remove the extra words to reply by e-mail. Don't e-mail me. I am
kidding. No I am not.
 
Reply With Quote
 
 
 
 
gimme_this_gimme_that@yahoo.com
Guest
Posts: n/a
 
      06-18-2007
In IE6, sometimes, if an XHTML file has a missing tag (so that the
page isn't actual XML) then JavaScript sometimes won't find forms
referenced using document.myformname syntax.


I often save my JSPs to disc and open them up in IE to confirm the XML
is well formed.


 
Reply With Quote
 
RobG
Guest
Posts: n/a
 
      06-18-2007
On Jun 19, 12:45 am, -Lost <(E-Mail Removed)> wrote:
> -Lost wrote:
> > In Firefox and Safari for example, if I serve my XHTML documents as
> > application/xml or xhtml+xml they only display the top inch or so of the
> > document.

>
> > In Opera it says "object has been blocked."

>
> > In Internet Explorer of course you get total rubbish. Anything from
> > "page cannot be loaded" to "403 no permission."

>
> > The thing is, I figured the first two at least could handle it, maybe
> > even Opera. I knew how IE would handle it.

>
> > Granted, I know the caveats of using XHTML on the web, but irregardless
> > I would like to know why it behaves this way.

>
> > What makes my XHTML pages render as one to two inch strips across the
> > top of the browser?

>
> > If anyone needs an example page to inspect, let me know.

>
> Ugh, it just dawned on me that this is probably a purely HTML-related
> question.


If I'd seen your post earlier I would have recommended ciah and
provided a warning about the type of replies you might get.

Despite the tone of some posters in that forum, you will usually get
excellent advice.


--
Rob


 
Reply With Quote
 
-Lost
Guest
Posts: n/a
 
      06-19-2007
RobG wrote:
> On Jun 19, 12:45 am, -Lost <(E-Mail Removed)> wrote:
>> -Lost wrote:
>>> In Firefox and Safari for example, if I serve my XHTML documents as
>>> application/xml or xhtml+xml they only display the top inch or so of the
>>> document.
>>> In Opera it says "object has been blocked."
>>> In Internet Explorer of course you get total rubbish. Anything from
>>> "page cannot be loaded" to "403 no permission."
>>> The thing is, I figured the first two at least could handle it, maybe
>>> even Opera. I knew how IE would handle it.
>>> Granted, I know the caveats of using XHTML on the web, but irregardless
>>> I would like to know why it behaves this way.
>>> What makes my XHTML pages render as one to two inch strips across the
>>> top of the browser?
>>> If anyone needs an example page to inspect, let me know.

>> Ugh, it just dawned on me that this is probably a purely HTML-related
>> question.

>
> If I'd seen your post earlier I would have recommended ciah and
> provided a warning about the type of replies you might get.


I appreciate it. I can handle Dingley, and the rest. It's Korpela
that is the problem. Normally I bear with his crass, pedantic superiority.

I didn't feel like it this time though.

> Despite the tone of some posters in that forum, you will usually get
> excellent advice.


I don't mind the tone, but being called a troll simply because I didn't
remember 117 militant styles of posting is simply moronic.

I am a firm believer in that you can be a genius, and still be stupid as
hell. (Again referring to Korpela.)

--
-Lost
Remove the extra words to reply by e-mail. Don't e-mail me. I am
kidding. No I am not.
 
Reply With Quote
 
Randy Webb
Guest
Posts: n/a
 
      06-19-2007
Good Man said the following on 6/18/2007 12:42 PM:
> -Lost <(E-Mail Removed)> wrote in
> news:(E-Mail Removed):
>
>> In Firefox and Safari for example, if I serve my XHTML documents as
>> application/xml or xhtml+xml they only display the top inch or so of
>> the document.
>>
>> In Opera it says "object has been blocked."
>>
>> In Internet Explorer of course you get total rubbish. Anything from
>> "page cannot be loaded" to "403 no permission."
>>
>> The thing is, I figured the first two at least could handle it, maybe
>> even Opera. I knew how IE would handle it.
>>
>> Granted, I know the caveats of using XHTML on the web, but
>> irregardless I would like to know why it behaves this way.

>
> It is highly advisable to serve XHTML documents as text/html if you want
> them to display properly in a web browser:


Then why write XHTML if you are going to serve it as text/html and make
the UA parse it as garbage code?

> <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />


META elements have absolutely nothing to do with the way a document is
served. By the time the browser sees that tag, it is too late.

--
Randy
Chance Favors The Prepared Mind
comp.lang.javascript FAQ - http://jibbering.com/faq/index.html
Javascript Best Practices - http://www.JavascriptToolbox.com/bestpractices/
 
Reply With Quote
 
dmark@cinsoft.net
Guest
Posts: n/a
 
      06-20-2007
On Jun 19, 10:32 am, Good Man <(E-Mail Removed)> wrote:
> Randy Webb <(E-Mail Removed)> wrote innews:(E-Mail Removed):
>
> >> It is highly advisable to serve XHTML documents as text/html if you want
> >> them to display properly in a web browser:

>
> > Then why write XHTML if you are going to serve it as text/html and make
> > the UA parse it as garbage code?

>
> Something for everyone to consider. Personally, I write it because we
> process a lot of our pages as XML in other server-side applications
> interacting with them.


Not to mention that IE8 will have an XML parser. XHTML served as text/
html is less than ideal, but it would be backwards to revert to HTML
at this point.

XHTML pages should render properly in FireFox and other standards-
based browsers when served with XML MIME types. Since this is a JS
group, it is useful to note that you cannot use document.write,
innerHTML, etc. when serving XHTML this way.

And since IE7 and prior versions cannot deal with XML MIME types, you
need to check the accept header of the request before sending pages as
anything but text/html.

 
Reply With Quote
 
Randy Webb
Guest
Posts: n/a
 
      06-20-2007
http://www.velocityreviews.com/forums/(E-Mail Removed) said the following on 6/19/2007 8:58 PM:
> On Jun 19, 10:32 am, Good Man <(E-Mail Removed)> wrote:
>> Randy Webb <(E-Mail Removed)> wrote innews:(E-Mail Removed):
>>
>>>> It is highly advisable to serve XHTML documents as text/html if you want
>>>> them to display properly in a web browser:
>>> Then why write XHTML if you are going to serve it as text/html and make
>>> the UA parse it as garbage code?

>> Something for everyone to consider. Personally, I write it because we
>> process a lot of our pages as XML in other server-side applications
>> interacting with them.

>
> Not to mention that IE8 will have an XML parser.


That is what they said about IE7 as well. And since it took 8 years to
get IE7 out, then IE might support it in 2020.

> XHTML served as text/html is less than ideal,


XHTML served as text/html is wasted time and effort.

> but it would be backwards to revert to HTML at this point.


Nobody said anything about going backwards. HTML is current and nothing
about is "backwards". And to call it "backwards" is plain wrong. XHMTL
on the web, in 2007, is what is "wrong".

--
Randy
Chance Favors The Prepared Mind
comp.lang.javascript FAQ - http://jibbering.com/faq/index.html
Javascript Best Practices - http://www.JavascriptToolbox.com/bestpractices/
 
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
No more stuff on C:\Documents and Settings\[User]\My Documents\Visual Studio 2005\ craigkenisston@hotmail.com ASP .Net 1 10-18-2006 03:31 PM
serving xhtml with php abracad_1999@yahoo.com HTML 31 07-22-2006 09:52 AM
Solving script and other problems for serving true xhtml 1.1 cwdjrxyz@yahoo.com Javascript 1 08-27-2005 10:31 PM
Serving html "documents' instead of PDF or Docs phil HTML 13 06-29-2004 01:50 PM



Advertisments