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

scroller and db

Hi Marina,
I have a group scroller, heres a s/s

Image

this is the code (kindly supplied by Joe) is on page load and popsup when textinput is clicked.

code< 21 ; i++) whl3 = ""+i;

var newwhl = JSON.stringify(whl3);

$(function(){

var whl2 = {'Car-Parts':'Car Parts',
'Car-Engines':'Car Engines',
'Mixed-Load':'Mixed Load',
'Other':'Other'};

var wheel = [{},{},{}];

wheel[0]['#Items'] = whl3;
wheel[2]['#Load'] = whl2;
wheel[1]['Packaged'] = whl1;
$('#j_16').scroller({ // ,
wheels: wheel,
height: 25
});
}); code

I dont know if its possiblle but can we populate these scrollers from db.

thx/code/code

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

scroller and db

Sorry Marina,
code didn't paste properly, this is the code

codevar whl1 = { "Apples": "Apples", "Oranges": "Oranges", "Pears": "Pears", "Lime": "Lime", "Lemon":"Lemon" };

var whl3 = {};
for(var i = 1 ; i < 21 ; i++) whl3 = ""+i;

var newwhl = JSON&#46;stringify(whl3);

$(function(){

var whl2 = {'Car-Parts':'Car Parts',
'Car-Engines':'Car Engines',
'Mixed-Load':'Mixed Load',
'Other':'Other'};

var wheel = [{},{},{}];

wheel[0]['#Items'] = whl3;
wheel[2]['#Load'] = whl2;
wheel[1]['Packaged'] = whl1;
$('#j_16')&#46;scroller({ &#47;&#47; ,
wheels: wheel,
height: 25
});
}); /code

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

scroller and db

Could you clarify please what do you mean on "populate these scrollers from db"? Do you mean values for whl1,whl2,whl3?

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

scroller and db

Yes exactly Marina,
although the values of each wheel would have relationships with the others,
for eg zip code, town, company name

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

scroller and db

Hello! To get values whl1,whl2,whl3 from DB you have to corresponding services and map results to localStorage, then in function get that results from storage.
As for "the values of each wheel would have relationships with the others" this should help http://docs.appery.io/tutorials/build...

Return to “Issues”