On Aug 26, 2008, at 6:38, hussayn wrote:

<snip/>
which is absolutely perfect... but for some reason the web browser (or dojo) needs the closing "</script>" although the script tag does not contain any
content...

I did not find any configuration parameter in cocoon, so i just added a fake
entry into the scripts body:

            <script type="text/javascript"
src="servlet:dojo:/resource/external/dojo/dojo/dojo.js"
             djConfig="parseOnLoad:true, isDebug:true">&#160;</script>

That worked and now dojo (or my browser, or both???) seems to be happy.

But i don't like this hack very much. So how can i force cocoon (probably
the xhtml-serialiser ?) to create a tag-pair around an empty body ?

Thanks for your post, I just got bitten by that bug too.
I guess when using forms, it's necessary to add a transformation at the end to insert the hack:

  <xsl:template match="script">
    <script>
      <xsl:apply-templates select="@*"/>
      <xsl:apply-templates select="text()"/>
      <xsl:text>&#160;</xsl:text>
    </script>
  </xsl:template>

This is a bug only in Mozilla and IE, AFAIK. Safari is fine with self- closing <script/> tags but helpfully warns about other browsers.

A.


---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to