Hi.
I am facing about the same problem. I created a Menu and selecting its values just works fine. But at some point I need to modify the entries in the selection list. Therefore I created a new little function which seems to touch at least the correct point, but just the text of the object is changed. But no changes according the items. No new entry, and even deleting all current items just seems to have no effect.
function updateMenuItems()
{
var list = document.getElementById( "m1-MyMenu-selectListMenu1" );
while ( list.childNodes.length > 0 )
list.removeChild( list.childNodes[list.childNodes.length-1] );
var person = document.createElement('person');
person.setAttribute('id', '#m1-hidden-x1');
person.setAttribute('innerText', 'Text');
person.setAttribute('val', 'myvalue');
person.setAttribute('value', 'myvalue');
person.setAttribute('selected', 'selected');
person.setAttribute('name', 'name');
person.innerText = 'Text';
list.appendChild(person);
phoneui.preprocessDOM('#m1-MyMenu');
alert('done!');
}
Maybe someone can complete/correct my sample project (see attachment).
JohnJake2
Attachments:
You must be
logged in to view attached files.