Page 1 of 1
How to load an image into jquery image widget programatically
Posted: Fri Oct 04, 2013 2:04 pm
by Pasteur Miranda
Hi,
Code: Select all
I would like to load an Image to a Jquery image widget in application runtime, that is, I woud like to write a javascrip code to "load" the image to an image widget using Appery.getImagePath("imagename"). Please, could you tell me what is the jquery code to load the image to an image widget?
Thank you
How to load an image into jquery image widget programatically
Posted: Fri Oct 04, 2013 3:54 pm
by Oleg Danchenkov
I'm not sure I understand you. What do you mean "Jquery image widget"? Could you please clarify?
How to load an image into jquery image widget programatically
Posted: Fri Oct 04, 2013 9:36 pm
by Pasteur Miranda
Hi Oleg,
Sorry, I mean the image component. I would like to know how to load the image using Java script or jquery commands.
Thank you
How to load an image into jquery image widget programatically
Posted: Fri Oct 04, 2013 9:59 pm
by maxkatz
Get a reference to the component in the DOM, then set the needed attribute to the image. If you use Appery.getImagePath(..) then the image will be already uploaded into your app.
How to load an image into jquery image widget programatically
Posted: Fri Oct 04, 2013 10:18 pm
by Pasteur Miranda
Thanks Max,
The idea is to upload the image to my app and and set the "image path" atribute of the image component inside Javascript . I want to load the image from load event from the page where the image component is located using something similar this:
Code: Select all
myimage.setImage(Appery.getImagePath("imagename"));
Thanks
How to load an image into jquery image widget programatically
Posted: Fri Oct 04, 2013 10:29 pm
by maxkatz
If the component has such method - you can do that.