Click to See Complete Forum and Search --> : some problems on firefox
areszhuang
04-18-2005, 09:57 AM
hi,everyone! I am using this script as a part of my web programe. it works fine on ie,but can't display on firefox. Can anyone help out to make some adjustments so that it works on firefox.thanks a lot!
<script language="JavaScript">
<xsl:comment><![CDATA[
if (!hp.isHomePage('http://mp3.tom.com/')) {document.write("<a href=\"#\" onClick=\"style.behavior='url(#default#homepage)';setHomePage('http://mp3.tom.com/');\" class=\"p12\">AS a homepage!</a>");}
]]></xsl:comment>
</script>
:)
at a very quick glance:
<script type="text/JavaScript">
and... if it is a javascript code why take it as a xls comment?
areszhuang
04-18-2005, 08:02 PM
if I do not use javascript as xsl comment , it will error.
anyone who can help me adjust the code .
thanks!
phpnovice
04-18-2005, 08:08 PM
I don't know if I've got this right, but have you tried something more like this? I also believe that those double-dashes I added are required.
<script language="JavaScript">
<!--[CDATA[
if (!hp.isHomePage('http://mp3.tom.com/')) {
document.write('<a href="#" onClick="style.behavior=\'url(#default#homepage)\'; setHomePage(\'http://mp3.tom.com/\');" class="p12">AS a homepage!</a>');
}
]]-->
</script>
areszhuang
04-18-2005, 09:55 PM
it doesn't work as well,but thanks all the same!
i find this in firefox's mainpage.
http://www.mozilla.org/projects/xslt/faq.html
What about document.write?
Just like for XHTML, document.write is not supported during XSLT transformations.
is the problem of the object document ?
who can tell me how can i solve this problem?
phpnovice
04-18-2005, 10:33 PM
Well, in another post, I found this format:
<script type="text/javascript">
//<![CDATA[
javascript code here
//]]>
</script>
areszhuang
04-19-2005, 01:23 AM
it can't work too!
areszhuang
04-19-2005, 10:10 AM
i am crying ,lol,who can tell me!