OZONE Asylum
Forums
XML - XSL - XSLT - XHTML - CSS - DOM
using javascript in a xsl stylesheet
This page's ID:
10900
Search
QuickChanges
Forums
FAQ
Archives
Register
Edit Post
Who can edit a post?
The poster and administrators may edit a post. The poster can only edit it for a short while after the initial post.
Your User Name:
Your Password:
Login Options:
Remember Me On This Computer
Your Text:
Insert Slimies »
Insert UBB Code »
Close
Last Tag
|
All Tags
UBB Help
Well i have to explain... in the former example i was using the tag <script> in the head section of the html code generated by the xsl stylesheet. If i erase the comment tags i have to use the entity names & and < --- and the functions don't work. Then i tried to do something like that: <?xml version="1.0"?> <xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" xmlns:lxslt="http://xml.apache.org/xslt" version="1.0"> <xsl :output method="html" /> <lxslt:script lang="JavaScript"> function MM_reloadPage(init) { if (init==true) with (navigator) {if ((appName=="Netscape")&&(parseInt(appVersion)==4)) { document.MM_pgW=innerWidth; document.MM_pgH=innerHeight; onresize=MM_reloadPage; }} else if (innerWidth!=document.MM_pgW | | innerHeight!=document.MM_pgH) location.reload(); } MM_reloadPage(true); function MM_findObj(n, d) { var p,i,x; if(!d) d=document; if((p=n.indexOf("?"))>0&&parent.frames.length) { d=parent.frames[n.substring(p+1)].document; n=n.substring(0,p);} if(!(x=d[n])&&d.all) x=d.all[n]; for (i=0;!x&&i<d.forms.length;i++) x=d.forms[i][n]; for(i=0;!x&&d.layers&&i<d.layers.length;i++) x=MM_findObj(n,d.layers[i].document); if(!x && document.getElementById) x=document.getElementById(n); return x; } function MM_showHideLayers() { var i,p,v,obj,args=MM_showHideLayers.arguments; for (i=0; i<(args.length-2); i+=3) if ((obj=MM_findObj(args[i]))!=null) { v=args[i+2]; if (obj.style) { obj=obj.style; v=(v=='show')?'visible' :(v='hide')?'hidden':v; } obj.visibility=v; } } </lxslt:script> <xsl:template match="/"> <head> etc... But it doesn't work again! Now... I'm not so interested in using exactly these functions! So if someone has some functions useful to show and hidden layers, and can help me... i'll be grateful. The only important thing is that i need not to name the layers in the functions' definition: i need to pass the name of the layes as a variable of the function. Thank you guys, Stefano
Loading...
Options:
Enable Slimies
Enable Linkwords
« Backwards
—
Onwards »