Pasteur Miranda
Posts: 0
Joined: Thu Aug 01, 2013 2:59 am

How to load an image into jquery image widget programatically

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
Oleg Danchenkov
Posts: 0
Joined: Tue Apr 30, 2013 5:51 pm

How to load an image into jquery image widget programatically

I'm not sure I understand you. What do you mean "Jquery image widget"? Could you please clarify?

Pasteur Miranda
Posts: 0
Joined: Thu Aug 01, 2013 2:59 am

How to load an image into jquery image widget programatically

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

maxkatz
Posts: 0
Joined: Fri Aug 13, 2010 3:24 pm

How to load an image into jquery image widget programatically

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.

Pasteur Miranda
Posts: 0
Joined: Thu Aug 01, 2013 2:59 am

How to load an image into jquery image widget programatically

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

maxkatz
Posts: 0
Joined: Fri Aug 13, 2010 3:24 pm

How to load an image into jquery image widget programatically

If the component has such method - you can do that.

Return to “Issues”