Michael4771079
Posts: 0
Joined: Sat Jul 21, 2012 2:03 pm

save text input to selectmenu

names are correct and are the same in js

Maryna Brodina
Posts: 0
Joined: Thu Apr 05, 2012 7:27 am

save text input to selectmenu

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

Michael4771079
Posts: 0
Joined: Sat Jul 21, 2012 2:03 pm

save text input to selectmenu

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

Maryna Brodina
Posts: 0
Joined: Thu Apr 05, 2012 7:27 am

save text input to selectmenu

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)

Michael4771079
Posts: 0
Joined: Sat Jul 21, 2012 2:03 pm

save text input to selectmenu

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)

Maryna Brodina
Posts: 0
Joined: Thu Apr 05, 2012 7:27 am

save text input to selectmenu

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

Michael4771079
Posts: 0
Joined: Sat Jul 21, 2012 2:03 pm

save text input to selectmenu

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

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

Maryna Brodina
Posts: 0
Joined: Thu Apr 05, 2012 7:27 am

save text input to selectmenu

Yes

Michael4771079
Posts: 0
Joined: Sat Jul 21, 2012 2:03 pm

save text input to selectmenu

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

Maryna Brodina
Posts: 0
Joined: Thu Apr 05, 2012 7:27 am

save text input to selectmenu

Check is there any JS error in console

Return to “Issues”