Thanks for the responses. I put the script in an external file (as suggested) to resolve my XSLT problem (it was interpreting the '<' as part of an XML tag, causing it to think the document was not well formed).
My page still does not load properly (acts like it isn't executing my function).
Here is a more extensive description to my problem.
ASP code:
Code:
Response.Write(source.transformNode(style))
note:source is XML loaded into DOM, style is XSLT loaded into DOM
XSLT includes javascript function that interacts with Microsoft Office Web Components (chart object). This is the javascript that I've moved to an external file.
Following the javascript, the XSLT file includes alot of HTML, including the following used to define a chart object:
Code:
<td width="35%" height="32"><div align="center">chart heading1<br />chart heading2</div><OBJECT CLASSID="clsid:0002E546-0000-0000-C000-000000000046" height="175" width="100%" id="chart1" border="0" style="border:0px;"><SPAN STYLE="color:red">ActiveX control failed to load! -- Please check browser security settings.</SPAN></OBJECT><div align="center">chart heading 3<br />chart heading 4</div></td>
Finally, following the HTML code but still within the body, another script block is included in the XSLT to call the prior defined javascript function (one located in the external file) so that the chart is drawn before the page displays.
What appears to be happening is that the HTML renders fine, but the final script block does not execute; and as a result, I just get a Microsoft OWC image located where my chart should be.
One suggestion, from above, is to add an onload event to body. I tried doing that - having it call the function at load time. Unfortunately, that didn't work either. I'm guessing that is due to the chart object not being created until after HTML is rendered (or the external javascript file not yet being loaded).
Any other suggestions? Thanks again.
Brian