-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

Jan,

On 5/21/2009 4:51 PM, Jan Peters-Anders wrote:
> The taglib uses
> 
> document.body.appendChild
> 
> which causes IE 7 to crash

Shocking.

> :( Microsoft states as workaround to upgrade
> to IE 8, that is <irony>a very good solution</irony>

They also suggest:

"
To work around this problem, write script blocks that modify only closed
containers or that modify only the script's immediate container element.
To do this, you can use a placeholder to close the target container, or
you can move the script block into the container that you want to modify.
"

You could move your script code to a different place (and probably
discontinue using the taglib). I suspect you could easily write this
javascript as an external file that you call from wherever you need it.

I have a document myself with this rough layout:

<html>
  <body>
    <div id="target">
    </div>
    <script>
        // call addChild on div#target
    </script>
  </body>
</html>

This works. I think you have a few options, here, besides re-doing
everything:

1. Create an empty <div> that takes up no space, and use that as the
target for your addChild.

2. Move the <script> that you are using to another place in the file
   (though you might not be able to, given that you're using an onclick
   event or something... right?)

3. Try something like calling a previously-defined function (at the top-
   level, under <body>/<script>) that does your dirty work. It's unclear
   to me if the problem is the location of the javascript source that
   calls addChild or the fact that you are (directly or indirectly)
   calling addChild from an existing child element.

> Thanks again, I will have to find another way of doing things, I guess,
> since it is odd to let users encounter this problem and let them be
> annoyed about the website not working.

You could always disable this particular function for certain MSIE
users. It looks like this affects all versions of MSIE prior to MSIE 8.
I love this note under the "status":

"
This behavior is by design.
"
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.9 (MingW32)
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org/

iEYEARECAAYFAkoWoBoACgkQ9CaO5/Lv0PCn+wCfVZX0ddd0Yq9x/JOtUqyGXSVK
82IAoLVCtdgtJchEByrTjxa89gv4Kq17
=/24a
-----END PGP SIGNATURE-----

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org
For additional commands, e-mail: users-h...@tomcat.apache.org

Reply via email to