Hi Branko,
I found your question a bit unclear, but after looking at your
documents, it seems that what you are trying to do is embedding
script-elements in an XSLT stylesheet and expecting them to be run when
you insert the resulting DOM tree into the browsers DOM tree.
Well, every now and then it will work the way you expect it to. And in
this simple example you are lucky to have it working in FF. I'd like to
start a discussion about the pros (little) and cons (many) of using
script tags from xslt and interpreting them in the browser, but I won't
bother you with it. Instead, look up the excellent prototype.js
(http://www.sergiopereira.com/articles/prototype.js.html) library, which
has built in methods to get these script tags working in any browser.
They did the hassle for you.
Since prototype does not help you so much with xslt (but it does with
many many other things), you may also consider Sarissa
(http://sarissa.sf.net), which gives you a generalized view of the
XSLTProcessor and XMLHttpRequest objects from any browser.
Btw(1), in case you are interested, the trick pulled by prototype.js is
to extract the script-tags, store them separately and execute them
separately.
Btw(2), you may found the same problems (or close) when trying to embed
<style> tags from xslt. It will work sometimes and it won't the other.
Btw(3), there are some mailing list on these particular subjects.
Cheers,
-- Abel Braaksma
http://www.nuntia.com
Branko Kokanovic wrote:
I'm struggling to get embedded javascript work in IE 6.0. I'm using
javascript to generate inner html from xsl and xml. Inside xsl is
<script> (javascript) that works in mozilla, but just get ignored in
IE. I searched throught archive, but nobody asked anything similar, so
it must be my weak precognition of XSLT. I made stripped-out example
at:
--~------------------------------------------------------------------
XSL-List info and archive: http://www.mulberrytech.com/xsl/xsl-list
To unsubscribe, go to: http://lists.mulberrytech.com/xsl-list/
or e-mail: <mailto:xsl-list-unsubscribe(_at_)lists(_dot_)mulberrytech(_dot_)com>
--~--