views:

45

answers:

1

I have many radio button in my Flex form, when i click on generate XML... the button which is clicked should have value 1 and rest as zero.

<options>
- <option value="0">
  <text>Text0</text> 
  <feed>Feed0</feed> 
  </option>
- <option value="0">
  <text>Text1</text> 
  <feed>Feed1</feed> 
  </option>
  </options>

Below comes Flex code.

                   var numOptions=2;
  for(var i:uint=0;i<numOptions;i++)
  {
  var optionNode:XML= <option></option> 
  optionsNode.appendChild(optionNode)
  optionNode.text="Text"+i
  optionNode.feed="Feed"+i
  if(shTF0.selected) {
  optionNode.@value=1;
   } else{
  optionNode.@value=0; 
  }
A: 

what is the question?

barbuza
sorry... updated