Home. 
.

transparent

transparent

transparent

Altova Mailing List Archives


Re: javascipt in xsl not working

From: Chuck Jungmann <NOchuckSPAM@----.--->
To: NULL
Date: 5/8/2006 10:58:00 AM

You are just showing the proof that the javascript is failing, but I'm
curious what javascript you are trying to generate.

I was working on a similar technique a few days ago where I was
generating dialogs based on XML data.  I was trying to pass data as
vars in a <script type="text/javascript"> block.

I couldn't access the javascript either. Just for a sanity check, I
set the innerHTML with the transformed data, then did alert(innerHTML)
and found that the javascript block didn't make the transfer.  I'm not
sure why it didn't work, perhaps the script has to go in the <head>
block with working with the DOM.

What I did instead is to generate a named form with hidden input
elements for the data I needed.  Then when I needed to access the
data, I would use "generatedForm.elementName.value."  I don't know it
this helps, but I can't think of a reason to include executable code
in a transform that goes into an already-running page with scripts
already loaded.

HTH
Chuck Jungmann

On 8 May 2006 05:26:58 -0700, nx.nine@g... wrote:

>i made the change suggested, IE now tells me that the stylesheet does
>not contain a document element and does not render anything.
>
>i have a feeling the problem might be caused by the way that i append
>the transformed data  to the page. the only method i've found of adding
>the result of transformNode to the page is by making a dummy div and
>making the innerHTML the output and appending that.
>i'm not very familiar with how to do things in IE, and every time i've
>tried a firefox-esque method of appending the DOMDocument to the page
>it gives me an error.
>
>i may be barking up the wrong tree, but i think it's worth mentioning
>
>thanks for helping me out =)



transparent
Print
Mail
Like It
Disclaimer
.

These Archives are provided for informational purposes only and have been generated directly from the Altova mailing list archive system and are comprised of the lists set forth on www.altova.com/list/index.html. Therefore, Altova does not warrant or guarantee the accuracy, reliability, completeness, usefulness, non-infringement of intellectual property rights, or quality of any content on the Altova Mailing List Archive(s), regardless of who originates that content. You expressly understand and agree that you bear all risks associated with using or relying on that content. Altova will not be liable or responsible in any way for any content posted including, but not limited to, any errors or omissions in content, or for any losses or damage of any kind incurred as a result of the use of or reliance on any content. This disclaimer and limitation on liability is in addition to the disclaimers and limitations contained in the Website Terms of Use and elsewhere on the site.

.
.

transparent

transparent