• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Jeanne Boyarsky
  • Ron McLeod
  • Paul Clapham
  • Liutauras Vilda
Sheriffs:
  • paul wheaton
  • Rob Spoor
  • Devaka Cooray
Saloon Keepers:
  • Stephan van Hulst
  • Tim Holloway
  • Carey Brown
  • Frits Walraven
  • Tim Moores
Bartenders:
  • Mikalai Zaikin

using javascript in xsl

 
Greenhorn
Posts: 3
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hi!
I'm trying to set up an HTML-site based on an xml-file rendered with xsl. I would like to split the site in two frames by defining a javascript function().
Here's the code:
<!--Root Template-->
<xsl:template match="/">
<html>
<head>
<title>xml-generated module</title>
<meta http-equiv="Content-Type"
content="text/html; charset=iso-8859-1"/>
<script language="JavaScript">
<![CDATA[function mainframe() return "<html><body><xsl:apply-templates select="//titre" /></body></html>";}]]>
<![CDATA[function linkframe() {return"<html><body><span>Foo</span></body></html>";}]]>
</script>
</head>
<frameset cols="25%,75%" rows="100%" border="1">
<frame name="linkview" src="javascript arent.mainframe();"/>
<frame name="mainview" src="javascript arent.linkframe();"/>
</frameset>

</html>
</xsl:template>
<!---...-->
Without javascript, everything is working fine.
Does anybody know what I'm missing?
Thanks for your help.
Regards, Nathalie
 
No thanks. We have all the government we need. This tiny ad would like you to leave now:
a bit of art, as a gift, the permaculture playing cards
https://gardener-gift.com
reply
    Bookmark Topic Watch Topic
  • New Topic