Altova Mailing List Archives>Archive Index >microsoft.public.xsl Archive Home >Recent entries >Thread Prev - can't get checkbox values using msxsl:script [Thread Next] Re: can't get checkbox values using msxsl:scriptTo: NULL Date: 9/10/2008 8:22:00 AM You've already had a reply to this question, By Martin Honnen. Once the XSLT has finished the only script that can execute is one in the HTML. Your script executes inside the XSLT which has no reference to the HTML DOM. So if you show what HTM -- Joe Fawcett (MVP - XML) http://joe.fawcett.name L you want then we can probably help with the script, although that question is nothing to do with XSLT, it's an HTML/JavaScript problem. "bgraves" <bgraves@w...> wrote in message news:8baa92e7-cadd-4162-b0a6-6aa108928ade@s...... > How can I get values from named controls? I don't seem to have access > to anything on the page. When I use this stylesheet, I always get the > following error: > System.ArgumentException: Last Trace Point=[]. Object required > > <?xml version="1.0" encoding="utf-8" ?> > <xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/ > Transform" xmlns:msxsl="urn:schemas-microsoft-com:xslt" > xmlns:user="urn:schemas-microsoft-com:xslt"> > <msxsl:script language="JavaScript" implements-prefix="user"> > <![CDATA[ > function GetCheckboxes(f) > { > var prodIds = "" > for(var i = 0;i<f.chk.length;i++) > { > if(f.chk[i].checked) > { > prodIds = prodIds + "," + f.chk[i].value; > } > } > > return prodIds > } > ]]> > </msxsl:script> > <xsl:template match="/"> > <div id="centerFull"> > <br/> > <br/> > > <center> > <input type="checkbox" name="chk" id="c1" value="val1" /> > <input type="checkbox" name="chk" id="c2" value="val2" /> > <input type="button" value="Compare" > onclick='window.open("compare.aspx? > productIDs={user:GetCheckboxes(this)}")'></input> > </center> > </div> > </xsl:template> > </xsl:stylesheet> | ||||||
| Company | Legal | Press | Partners | Careers | Sitemap | Contact Us | Altova Blog | Mobile | Full Site | |||
|
