This is the mail archive of the
xsl-list@mulberrytech.com
mailing list .
RE: Node numbering
- To: "'xsl-list at mulberrytech dot com'" <xsl-list at mulberrytech dot com>
- Subject: RE: Node numbering
- From: Joshua Allen <joshuaa at microsoft dot com>
- Date: Thu, 27 Jul 2000 09:12:21 -0700
- Reply-To: xsl-list at mulberrytech dot com
use eval()
> -----Original Message-----
> From: Martin Bryan [mailto:mtbryan@sgml.u-net.com]
> Sent: Thursday, July 27, 2000 6:28 AM
> To: xsl-list@mulberrytech.com
> Subject: Node numbering
>
>
> I realise what I am about to ask is really a DHTML question
> rather than an
> XSL one, but as I am trying to use DHTML to generate XML I suspect the
> members of this mailing list will have been more likely to
> have encountered
> this problem than most DHTMLers.
>
> I want to use radio buttons to allow users to select one of
> three permitted
> values that I have allowed for one of the attributes on one of my XML
> elements. However, the attribute has to apply to each line in
> a table of
> entries. Because HTML requires you to use a different
> attribute name for
> each set of radio buttons, to avoid the entries for one line
> overwriting the
> entries for the next I have to index the names assigned to
> each set, Order1,
> Order2, etc. The problem is that I then want to use a loop to
> generate the
> XML from this. I have a loop that starts
> for (i=0; i < document.all.PropertyName.length; i++)
> {text += '<Component type="' +
> document.all.Order(i).getAttribute('value') + '">\n';
>
> Now this cannot work, because it tells you to get the ith
> Order object, not
> the entry whose name is Order+i. But I cannot see any
> mechanism that allows
> me to ask for the value attribute of an object whose name is
> composed of
> Order+i. Can anyone suggest how I could get around this
> problem, or do I
> have to use a very messy looking option menu to be able to
> make use of the
> loop?
>
> Thanks
>
> Martin Bryan
>
>
> XSL-List info and archive: http://www.mulberrytech.com/xsl/xsl-list
>
XSL-List info and archive: http://www.mulberrytech.com/xsl/xsl-list