cocoon-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Hunsberger, Peter" <Peter.Hunsber...@stjude.org>
Subject RE: Internet Explorer, XHTML, and CForms
Date Wed, 24 Mar 2004 14:38:45 GMT
Steve Krulewitz <shooz@mm.st> laments:

<snip/>

> So as things stand right now, if someone wants to use a textarea in 
> their forms and serve them as XHTML, they will run into problems on 
> Internet Explorer.  I think this is a problem since it is 
> *possible* to 
> do this -- a textarea rendered with an explicit closing tag 
> will render 
> properly on Internet Explorer and will be valid XHTML.  However, I do 
> not believe this is currently possible with Cocoon.
> 
> I believe the solution lies in extending the default XML 
> stream writer 
> that comes with Xalan (org.apache.xml.serializer.ToXMLStream).  A new 
> output setting could be added that provides a list of element 
> names that 
> should never be minimized when they are empty.  This would allow the 
> same XHTML pages that work on standards-compliant browsers to render 
> properly in Internet Explorer.

The quick and dirty hack, if you're not in a position to pick up Pier's
code, is to just change the transforms to output:

  <tag ...>&#160;</tag>

This is ugly for text area since it puts something in that the user
doesn't likely want and may not know to remove.  However, for script and
comment and other similar tags it works fine. 

I've been hacking this for IE for so long (not just Cocoon) that it
seems like second nature to add some onfocus JavaScript to select any
existing text...

<snip/>


Mime
View raw message