Javascript functions not identified by Firefox

R

Rose Girl

I have a web application that uses xsl and javascript which runs
smoothly on IE. Recently i decided to try it on FireFox 1.0 . But the
same application gives javascript errors as displayed in the console.
What i found out is that FireFox doesnt recognize Javascript functions
from a xsl page. Its ok from a html page.

I have given a code of a xsl page. Can someone point what possibly
could be the problem.

<?xml version="1.0" encoding="ISO-8859-1"?>
<xsl:stylesheet version="1.0"
xmlns:xsl="http://www.w3.org/1999/XSL/Transform">
<xsl:template match="/spider-xml">

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

function validate(){
alert("Help ! This function is not been called ...")
}

]]></xsl:comment></script>

</head>
<body>
<table>
<tr>
<td>
<a href="#xx">
<xsl:attribute name="onClick">validate();</xsl:attribute>
Some link
</a>
</td>
</tr>
</table>
</body>
</html>

</xsl:template>
</xsl:stylesheet>


Thankyou for your time.
Regards
Rose Girl.
 
M

Martin Honnen

Rose said:
I have a web application that uses xsl and javascript which runs
smoothly on IE. Recently i decided to try it on FireFox 1.0 . But the
same application gives javascript errors as displayed in the console.
What i found out is that FireFox doesnt recognize Javascript functions
from a xsl page. Its ok from a html page.

I have given a code of a xsl page. Can someone point what possibly
could be the problem.

<?xml version="1.0" encoding="ISO-8859-1"?>
<xsl:stylesheet version="1.0"
xmlns:xsl="http://www.w3.org/1999/XSL/Transform">
Add

<xsl:template match="/spider-xml">

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

get rid of that comment e.g. simply use
<script type="text/javascript"><![CDATA[
... script goes here ...
]]></script>
then I think the function should be found.

If you still have problems then with Firefox then please tell us the
exact error message you get in the JavaScript console.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,756
Messages
2,569,540
Members
45,025
Latest member
KetoRushACVFitness

Latest Threads

Top