- This topic has 4 replies, 2 voices, and was last updated 12 years, 3 months ago by
support-octavio.
-
AuthorPosts
-
Pablo22MemberNew to MobiOne (v2.3.1) but love it so far but I have this problem. One one of my screens I have two combos, cCountry and cPlace and I want to dynamically fill cPlace after the cCountry changes. I can populate cPlace correctly and select the first item in the list (always ‘Unknown’) but the text portion of cPlace remains still blank until I physically change its value.
Any help greatly appreciated.
support-octavioMemberA similar question here:
http://www.genuitec.com/support-genuitec/viewtopic.php?f=9&t=4323You should change some things as call a function in the Action: onChange of your first combobox. Let me know if you need further assistance.
Pablo22Member@Octavio
Thanks for the quick response.
The link you gave me takes me to a topic regarding adding gaming capabilities so I think that’s the wrong one.Anyway, I don’t think I could have explained my problem clearly.
I am calling the javescript function using the OnChange event of the first combo and the second combo is populating correctly.
The drop down portion of the combo lists the items and the first one is selected as expected but the text value of the first item isn’t showing in the combo. Like this…If I select the other item in the list it’s works fine from then on.
The code is very simple at the moment while I find my way around but is as follows…
var i = 10;
function doCountryChange() {
//Clear Place drop down
$(‘#m1-pCheckIn-hidden-select-cPlace’).empty();//Add new item
$(‘#m1-pCheckIn-hidden-select-cPlace’).append(‘<option value=”Unknown” label=”Unknown”>Unknown</option>’);
$(‘#m1-pCheckIn-hidden-select-cPlace’).append(‘<option value=”NewPlace’ + i + ‘” label=”New Place ‘ + i + ‘”>New Place ‘ + i + ‘</option>’);
$(‘select[name=”cPlace”] option:first’).attr(‘selected’,’selected’);
phoneui.preprocessDOM(‘pCheckIn’);//Increment counter
i++;
return;
}cPlace is the name of the second combo and pCheckIn the name of the screen.
Sorry if I wasn’t clear before. Hope this is more so.
Paul
Pablo22MemberJust figured it out. I have to set the text property of the second combo as well, as in
$(‘#m1-pCheckIn-cPlace’).text(‘Unknown’);Thanks.
Great product by the way.
Paul
support-octavioMemberHi Pablo22,
Apologies for provide you a wrong url. I messed up with a url that was viewtopic.php?t=4323?view=next, so I incorrectly delete the “?view=next” part and that was that lead you to wrong topic. I updated the link and it should be the right one now 🙂
-
AuthorPosts