|
[XSL-LIST Mailing List Archive Home] [By Thread] [By Date] [Recent Entries] [Reply To This Message] 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
|
PURCHASE STYLUS STUDIO ONLINE TODAY!Purchasing Stylus Studio from our online shop is Easy, Secure and Value Priced! Download The World's Best XML IDE!Accelerate XML development with our award-winning XML IDE - Download a free trial today! Subscribe in XML format
|

Cart








