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: 12/7/2008 8:26:00 PM
Lick my kitten
On 09/09/2008 18:32, in article
8baa92e7-cadd-4162-b0a6-6aa108928ade@s..., "bgraves"
<bgraves@w...> wrote:
> 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 | |||
|
