Page 5 of 6

save text input to selectmenu

Posted: Thu Jan 24, 2013 4:49 pm
by Michael4771079

names are correct and are the same in js


save text input to selectmenu

Posted: Thu Jan 24, 2013 4:58 pm
by Maryna Brodina

Could you clarify what do you mean on "acting very strange"?


save text input to selectmenu

Posted: Thu Jan 24, 2013 5:07 pm
by Michael4771079

the navigation is not working, the text cursor is appearing on selectmenu component, sellectmenu is not loaded we page opens, but updates after you save again, to and from selectmenus on book page are now undifined


save text input to selectmenu

Posted: Thu Jan 24, 2013 5:58 pm
by Maryna Brodina

In file selectmenu.js add next JS function

codefunction setSelectMenuOptionsForAddresses(select, options) {
options.sort(function(a, b){return a.localeCompare(b);} );
select.children().each(function() {$(this).remove()});
for(i=0; i<options&#46;length; i++) {
var label = options;
var newOption = $('<option value="'+label+'">'+label+'<&#47;option>');
select&#46;append(newOption);
}
select&#46;refresh();
}/code

On page Addresses you should call setSelectMenuOptionsForAddresses function instead of setSelectMenuOptions (on load, save and delete)


save text input to selectmenu

Posted: Thu Jan 24, 2013 6:41 pm
by Michael4771079

Hi Marina,
I have inserted to above code in selectmenu.js
navigation still not working.

And as I am having a blonde day!
I am not sure what you meant by this

On page Addresses you should call setSelectMenuOptionsForAddresses function instead of setSelectMenuOptions (on load, save and delete)


save text input to selectmenu

Posted: Thu Jan 24, 2013 7:06 pm
by Maryna Brodina

Just replace setSelectMenuOptions to setSelectMenuOptionsForAddresses in JS which you run on Load event, on Save and Delete Selcted buttons


save text input to selectmenu

Posted: Thu Jan 24, 2013 7:17 pm
by Michael4771079

do you mean change
setSelectMenuOptions(Tiggr('addressselectmenu'), myload('variable_name'));

to
setSelectMenuOptionsForAddresses(Tiggr('addressselectmenu'), myload('variable_name'));


save text input to selectmenu

Posted: Thu Jan 24, 2013 7:26 pm
by Maryna Brodina

Yes


save text input to selectmenu

Posted: Thu Jan 24, 2013 8:12 pm
by Michael4771079

I have done the above, I cannot navigate to book pageapp just hangs and the text cursor is appearing on the taxicoselectmenu?


save text input to selectmenu

Posted: Thu Jan 24, 2013 8:13 pm
by Maryna Brodina

Check is there any JS error in console