Jump to content

Javascript in XSL - Error: function not defined


Guest buzzfever

Recommended Posts

Guest buzzfever

I've got my javascript in my xsl file like so:

<script type="text/javascript" language="javascript">   <xsl:comment><![CDATA[ .... ]]></xsl:comment> </script>

Then later in my xsl file I have an event that calls a javascript function:

<img src="/btn_buy.gif" alt="Buy!" >   <xsl:attribute name="onmouseover"> 	   dropdownmenu(this, event, menu1, '140px', 'Common Market','Black Patch War')   </xsl:attribute>    <xsl:attribute name="onmouseout"> 	   delayhidemenu()    </xsl:attribute> </img>

I can see the Buy image and in Firefox's Error Console I get these errors: dropdownmenu is not defined and delayhidemenu is not defined. I've pulled out the Javascript and tested it in an HTML file and it works fine. So I'm guessing it's the xsl file's problem.Any ideas? Thanks.

Link to comment
Share on other sites

The problem is in the output of the XSLT. Find a way to see the output, and try that HTML.With Firefox's web developer, you can do so by opening the affected XML file and selecting from the toolbar "View Source > View Generated Source".

Link to comment
Share on other sites

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...