Home. 
.

transparent

transparent

transparent

Altova Mailing List Archives


Re: can't get checkbox values using msxsl:script

From: Kieran Ranger <kranger@-------.--.-->
To: 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>



transparent
Print
Mail
Like It
Disclaimer
.

These Archives are provided for informational purposes only and have been generated directly from the Altova mailing list archive system and are comprised of the lists set forth on www.altova.com/list/index.html. Therefore, Altova does not warrant or guarantee the accuracy, reliability, completeness, usefulness, non-infringement of intellectual property rights, or quality of any content on the Altova Mailing List Archive(s), regardless of who originates that content. You expressly understand and agree that you bear all risks associated with using or relying on that content. Altova will not be liable or responsible in any way for any content posted including, but not limited to, any errors or omissions in content, or for any losses or damage of any kind incurred as a result of the use of or reliance on any content. This disclaimer and limitation on liability is in addition to the disclaimers and limitations contained in the Website Terms of Use and elsewhere on the site.

.
.

transparent

transparent