Dynamically created jquery mobile controls are not created when I pass to another page
I have two html files in a blackberry project. And I am filling a select menu when I pass to the other page. But when I pass that page it is not created until I make a refresh manually. 

Here is inside of the js file I fill the select menu.

    $.getJSON('getunits.php?cat='+cat, function(response) {
			
	var listFrom = $('#listFrom');
	var listTo = $('#listTo');
	var count = 0;
		
	$.each(response, function(i, item) {
			listFrom.append("<option value="+item.unit+">"+item.unit+"</option>");
			listTo.append("<option value="+item.unit+">"+item.unit+"</option>");
			l[count] = new Array();
			l[count][0]=item.value;
			count++;
		});
	$('#listFrom').selectmenu('refresh');
	$('#listTo').selectmenu('refresh');
			
		

Any idea ?
Dynamically created jquery mobile controls are not created when I pass to another page
===

I have two html files in a blackberry project. And I am filling a select menu when I pass to the other page. But when I pass that page it is not created until I make a refresh manually. 

Here is inside of the js file I fill the select menu.

    $.getJSON('getunits.php?cat='+cat, function(response) {
			
	var listFrom = $('#listFrom');
	var listTo = $('#listTo');
	var count = 0;
		
	$.each(response, function(i, item) {
			listFrom.append("<option value="+item.unit+">"+item.unit+"</option>");
			listTo.append("<option value="+item.unit+">"+item.unit+"</option>");
			l[count] = new Array();
			l[count][0]=item.value;
			count++;
		});
	$('#listFrom').selectmenu('refresh');
	$('#listTo').selectmenu('refresh');
			
		

Any idea ?