can't select the radio buttons after insert them with IE7.

can't select the radio buttons after insert them with IE7.

I develop a component that inserts radio buttons into an div, after this it use the jquery ui buttonset widget on this elements.

this works like this example:

  1. var container = $('#thediv');
  2. var eopt = document.createElement("input");
  3. eopt.name=options.name;
  4. eopt.type='radio';
  5. $.each(data[options.list], function(j, val) {
  6.   var option = eopt.cloneNode(true);
  7.   option.value = j;
  8.   option.text = val;
  9.   option.id=options.name+(++i);
  10.   container.append($(option));
  11.   container.append(
  12.     $('<label id="'+option.id+'label" for="'+option.id+'">'+option.text+'</label>')
  13.   );
  14.   o++;
  15. }
  16. container.buttonset();

this works like expected.

but when I submit the parent form or when I register an change event with $('#thediv > input').change(function() {alert('test');});
it does not send the values of this radio buttons.

With firefox it works fine only matters IE7 .

you can see this live in Struts2 jQuery Plugin Showcase goto "Ajax Forms > Buttonset / Radio Buttons"

thanking you in anticipation

Best Regards

Johannes eppert