Hi, I am just trying using the add() methods with HTML strings which is same with the example HTML strings from populate options like below, however it still not able to read it! The reason to use HTML string is to display the label when populate the list.
Example HTML strings from populate,
// Populates the drop down using a JSON array
populate: '< option value="SelectBoxIt is:" >SelectBoxIt is:</ option >' +
'< option value="a jQuery Plugin" >a jQuery Plugin</ option >' +
'< option value="a Select Box Replacement" >a Select Box Replacement</ option >' +
'< option value="a Stateful UI Widget" >a Stateful UI Widget</ option >'
Hi, I am just trying using the add() methods with HTML strings which is same with the example HTML strings from populate options like below, however it still not able to read it! The reason to use HTML string is to display the label when populate the list.
Example HTML strings from populate, // Populates the drop down using a JSON array populate: '< option value="SelectBoxIt is:" >SelectBoxIt is:</ option >' + '< option value="a jQuery Plugin" >a jQuery Plugin</ option >' + '< option value="a Select Box Replacement" >a Select Box Replacement</ option >' + '< option value="a Stateful UI Widget" >a Stateful UI Widget</ option >'
Example HTML string will use to populate,
'< optgroup label="Japan" >'+'< option value="tokyo" >Tokyo</ option >' + '</ optgroup >' + '< optgroup label="Indonesia" >'+ '< option value="bali" >Bali</ option >' + '< option value="Jakarta" >Jakarta</ option >' + '</ optgroup >'
How to populate new drop down with HTML strings using add() method? Thank you so much.