xsl-list
[Top] [All Lists]

Re: Checkboxes in XSLT

2004-11-21 17:53:25
Not sure I'm understanding everything here, but....

Standard HTML/JavaScript dictates that if more than one form element has the 
same name, then they will need to be reference as an array via JavaScript.  
You DO NOT need to include the square brackets when naming your elements - 
this happens automagically.  If order is important, then you must ensure the 
items are rendered in the proper order.

So, an output of this:

<input type="checkbox" name="check1" value="Yes">
<input type="checkbox" name="check1" value="No">

will result in an array (document.form[0].check1).  And 
"document.form[0].check1[1].value" would equal "No".

HTH

Shawn

On Sunday 21 November 2004 15:36, Jen Jiang wrote:
I want the checkboxes to be an array so I include []
into the name. Is there other solutions that I can use
to form an array?


--~------------------------------------------------------------------
XSL-List info and archive:  http://www.mulberrytech.com/xsl/xsl-list
To unsubscribe, go to: http://lists.mulberrytech.com/xsl-list/
or e-mail: <mailto:xsl-list-unsubscribe(_at_)lists(_dot_)mulberrytech(_dot_)com>
--~--



<Prev in Thread] Current Thread [Next in Thread>