This repository has been archived by the owner on Oct 9, 2018. It is now read-only.
Create/Update Radio Button Dynamically #421
Milestone
Comments
Creating the radio button dynamically should be similar to that of the button control // Create the element just like you would in a normal screen declaration
var radio = document.createElement('input');
radio.setAttribute('type','radio');
radio.setAttribute('name', 'group1');
radio.setAttribute('value', 'foo');
radio.onclick = function() {
alert(this.value);
};
// Apply our styling
radio = bb.radio.style(radio);
// Insert it into the screen and update the scroller
document.getElementById('radioContainer').appendChild(radio);
bb.refresh(); |
I've got show, hide, and remove done - will send pull request in a few minutes |
tneil
pushed a commit
that referenced
this issue
Oct 26, 2012
#421 - Added show, hide, remove to radio buttons
Cool.. only the dynamic creation and samples updates left to go. I updated the wiki page and the change log |
Cool, @lyricidal got to it slightly before I could :) |
tneil
pushed a commit
that referenced
this issue
Dec 11, 2012
Wiki has been updated so this can now be closed |
Sign up for free
to subscribe to this conversation on GitHub.
Already have an account?
Sign in.
Ability to create and dynamically change the properties of a radio button dynamically after the DOM for a screen has been loaded.
The text was updated successfully, but these errors were encountered: