xsl-list
[Top] [All Lists]

HTML and Javascript problem (newbie)

2003-08-27 16:04:14
The majority of my HTML pages have 2 distinct sections:

1) Standard HTML stuff (forms, tables etc)
2) a 'DIV' element called srcBody that 'contains' the HTML output generated
by XSLT e.g.

<html>
<head>
      <!-- heaps of javascript includes -->
</head>

<body>
<table>
      <tr>
            <td>
                  <!-- table of stuff -->
            </td>
      </tr>
      <tr>
            <td>
                  <form id="xsl_form" name="xsl_form">
                        <div id="tabSection" width="98%" align
="center"></div>
                        <div id="srcBody"></div>
                        <input type="hidden" name="screenName" value
="activities"/>
                  </form>
            </td>
      </tr>
</body>
</html>

I then have an external Javascript function called applyStyle() which takes
the transformed XML and places it into the DIV called srcBody
i.e. srcBody.innerHTML = xml_data.transformNode(gStylesheet);

Problems start when I try to apply a Javascript mouseover tool to certain
places of the HTML and XSL (there's an include in the HTML file to the
external JS file)

Now..the mouseover tool works fine in the when applied to HTML elements but
not elements in the XSL. For some reason the HTML generated by XSL doesn't
recognise this javascript, even though they are part of the same file.
When viewing the final source code you *cannot* see the transformed HTML
inside the DIV which I believe is because of the innerHTML thing going on
(albeit my minimal understanding of Javascript). I guess that would roughly
explain why the javascript won't work but shouldn't the javascript still be
accessible by the XSL anyway????

I'm at a loss and hope someone has found their way around a simliar problem

Thanks all







Important:  This e-mail is intended for the use of the addressee and may 
contain information that is confidential, commercially valuable or subject to 
legal or parliamentary privilege.  If you are not the intended recipient you 
are notified that any review, re-transmission, disclosure, use or dissemination 
of this communication is strictly prohibited by several Commonwealth Acts of 
Parliament.  If you have received this communication in error please notify the 
sender immediately and delete all copies of this transmission together with any 
attachments.


 XSL-List info and archive:  http://www.mulberrytech.com/xsl/xsl-list



<Prev in Thread] Current Thread [Next in Thread>