Reinhard,
I modified the *-styling-*.xsl files to change the body/@onload call. They
were in the zip I sent you.
Strangely enough I had it working flawlessly with a short page of my own, both in IE and in Firefox, but when I later tested it in a long form (20+ widgets with one or more HTMLareas) in IE it worked for HTMLarea containing text, but not for empty forms. :-( In one occasion I even noticed that the HTMLarea appeared several seconds later!
Firefox was at least consistent (i.e. it works).
I'm sorry I don't have the time to extensively test various ideas posted on the HTMLare forum: - change the offsetleft and offsetwidth settings (con: this might not be possible if your web layout wants it different) - add an iframe in the HTML code, this should solve the timing problem (I haven't yet figured out where exactly that should be put) - set style:width=100% for the textarea. I've tried something similar and it didn't work. Maybe it does in combination with my initfunction in body/@onload
Re the modified forms styling files: As you can see it builds an htmlarea_onload function that calls the initfunctions of each HTMLarea. What I noticed when adding this function to body/@onload is that the XSL template doesn't work as expected:
<xsl:template match="body"> <xsl:attribute name="@onload">XXXX<xsl:value-of select="@onload"/></xsl:attribute> </xsl:template>
Where XXX is forms_onload in the field-styling.xsl and htmlarea_onload in the htmlarea-styling.xsl
Well, this doesn't work: the value of the attribute is replaced without the previous version being inserted. For now I fixed it by simply adding the "forms_onload" function in the htmlarea-styling.xsl as well.
I implemented an "afterload"-handler which is called right before the body end element. This ensures that the whole page is processed and all tables sizes are calculated. It works with IE6 (WinXP SP2) and Firefox 1.0.
-- Reinhard
