Page 1 of 1

Appery('mobileimage_2').attr('src', ' '+ Appery.getImagePath('imagename')+' ');

Posted: Wed Dec 11, 2013 2:55 pm
by Ketan Patil

on page one i am setting value of imagename to the image uploaded to UI.
on page 2 load event i am writing the js

Appery('mobileimage_2').attr('src', ' '+ Appery.getImagePath('imagename')+' ');

it is not working.

if i put actual imagename instead of variable (for test purpose) it is working


Appery('mobileimage_2').attr('src', ' '+ Appery.getImagePath('imagename')+' ');

Posted: Wed Dec 11, 2013 4:43 pm
by Kateryna Grynko

Hi Ketan,

If 'imagename' is a variable name it should go without quotes.

[quote:]i am setting value of imagename to the image uploaded to UI[/quote]How do you do this? Is 'imagename' a global variable? It's better to use localStorage:prelocalStorage.setItem("imagename", "myimg1name.png");/preOn the second page, read the value from localStorage:preAppery('mobileimage_2').attr('src', Appery.getImagePath(localStorage.getItem("imagename")));/pre


Appery('mobileimage_2').attr('src', ' '+ Appery.getImagePath('imagename')+' ');

Posted: Wed Dec 11, 2013 5:09 pm
by Ketan Patil

u solved my problem.

Thanks a LOT!