Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

Already on GitHub? Sign in to your account

ImageList refresh() #731

Closed
Sunaina15 opened this Issue Feb 27, 2013 · 3 comments

Comments

Projects
None yet
2 participants

Hi,

I need to dynamically add image list.

In my html file , I have
div data-bb-type="screen" data-bb-effect="fade">




in my app.js I am making an ajax call to my service,

function getAccessToken() {

var url = 'http://ipadd/Test/JSON/mycities';

jQuery.support.cors = true;
$.ajax({
type: 'POST',
url: url,
data:'{}',
contentType:"application/json; charset=UTF-8",
dataType:"JSON",
processData:true,
crossDomain:true,
success: function(data) {
var response = data;
alert(response.GetCitiesResult[0].CityName);

        $.each(response.GetCitiesResult, function(i, item) {

var items = [],
item;

// Create the item's DOM in a fragment
for (var i = 0; i < 5; i++) {
item = document.createElement('div');
item.setAttribute('data-bb-type','item');
item.setAttribute('data-bb-title','my title');
item.innerHTML = 'my description';
item.setAttribute('data-bb-img','foo.png');
item.onclick = function() {alert('clicked');};
items.push(item);
}
});

document.getElementById('city').refresh(items);
});
}

I get an error stating refresh() is undefined.

I am making use of bbui-0.9.5.js.

Can you please tell me how do i make use of refresh function here.

The image list is not getting displayed as image list.

Member

tneil commented Feb 27, 2013

Where are you calling this code? Before the DOM is loaded (onscreenready), or after the DOM is loaded (ondomready)?

Member

tneil commented Mar 11, 2013

Just checking back in to see if there are any updates on this issue?

Neil,

Sorry for the delay in the response.

I got it fixed.

I was not calling the div in the right way.

Thanks. you can close this issue.

On Mon, Mar 11, 2013 at 6:41 AM, Tim Neil notifications@github.com wrote:

Just checking back in to see if there are any updates on this issue?


Reply to this email directly or view it on GitHubhttps://github.com/blackberry/bbUI.js/issues/731#issuecomment-14693674
.

@tneil tneil closed this Mar 11, 2013

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment