Page 1 of 1

Setting image source to uploaded asset

Posted: Fri Mar 16, 2012 12:09 am
by pietro117

Hi, I'm putting together a newsletter app that includes a photo selector page. I'm using a slider to allow the user to choose the photo from a number that I have uploaded. How can I change the image source to the correct asset file when the slider value changes? Many thanks Peter


Setting image source to uploaded asset

Posted: Fri Mar 16, 2012 12:44 am
by maxkatz

I'd say the easiest way is to select the image component and change its 'src' attribute. To get the image component you can use:

code
Tiggr('id');
/code

you get jQuery element (http://help.gotiggr.com/documentation....

The only other thing, you do need to know the file names because when you upload an image, its name is changed to 'asset-xxxx'. We are planning to change that and keep the actual file name.


Setting image source to uploaded asset

Posted: Fri Mar 16, 2012 7:52 am
by pietro117

OK, many thanks for the reply.
I was setting the image source to the uploaded file name, rather than the asset file. Could you let me know if there's a quick way of getting the asset file names for each of my uploaded images?
Cheers
Peter


Setting image source to uploaded asset

Posted: Fri Mar 16, 2012 8:33 pm
by maxkatz

I think the easiest way would be to place all images on the page and get their names (asset-xxxx) from source. I know this is not the ideal solution, it will be simpler soon.