Hi team, i have a response with an array of json and i want to put an image by each id from the response, how can i do this? it's understood what i want to do?
I want fetch each value and set each image by each value
Hi team, i have a response with an array of json and i want to put an image by each id from the response, how can i do this? it's understood what i want to do?
I want fetch each value and set each image by each value
Can anyone give me one answer?
Hello
Code: Select all
I am not sure if this helps but i get 30 urls from the database and it converts the url to an image saved in the app. I am very new at this.
here is my thread https://getsatisfaction.com/apperyio/...
and my script
function getImage(dateName, imageLoc) {
for(i=0; i < data.length; i++) {
if(data.date == dateName) {
//You need to check this compone logic and modify it if it not rigth.
var imageUrl = data.image + data.dayofmonthimage;
//Logout to console - you can see result in browser console to debug it.
console.log("combined URL is = " + imageUrl);
//Set combine URL to component
Apperyio(imageLoc).attr("src", imageUrl);
}
}
}
//
// for(i=0; i < data.length; i++) {
// if (data.date == dateName) {
// Apperyio(imageLoc).attr("src", data.image);
// }
// }
//
//}
//getImage(''from date rown get URL from image column","image holder");
getImage("9/1/2014","sept1");
getImage("9/2/2014","sept2");
getImage("9/3/2014","sept3");
getImage("9/4/2014","sept4");
getImage("9/5/2014","sept5");
Hi Norman,
Could you clarify what have you tried and with what particular part you're having difficulties?
I made a new question further here, I thought that I would not answer, maybe this second drew the attention of someone else, but if you ask me eliminate it without any problems https://getsatisfaction.com/apperyio/...
Thanks for reply and for the code idea, i'll try to take the idea of this piece of code.
Hello Norman,
We are working on it and if you don't mind we'll post our reply in this thread.
My problem is as follows:
I have a ServiceProducts, this service returns me 30 products that match your search:
"brand": "String",
"field": "String",
"category": "String" ...
But that service does not return me pictures of each product, then they say on their web site to retrieve the image that you need to use the id of each of the products, I have no problem retrieving a single image.
What I try is that when a service ends, I call another service to get pictures, but if a test the service just return me a single image, i need know: how can I recover 30 products with 30 images?
For pictures I use another "ServiceImage" but this does not return me an array of images! only return a picture by request, One image by request id.
Using Node.js I have solved a loop, it was easy, but as I do in Appery?
Sorry for my English, but I would appreciate a solution, I have 2 days in this.