Page 1 of 1

change image by click

Posted: Tue Aug 04, 2015 9:50 am
by Mani Maran

Hey, I'm planing to change image by click! Concept is (single page) In my welcome page top left icon called menu icon if i click menu icon it wants to open panel so open panel event expires, on the same page and same position of menu icon The second image called back icon wants to appear if i hit click on back icon the opened panel wants to close the panel and then again menu icon wants to appear on the same place, Give me a hint to do? Image


change image by click

Posted: Tue Aug 04, 2015 10:45 am
by Serhii Kulibaba

Hello Mani,

You can change image's src attribute on click event:

Apperyio("imageName").attr("src", Apperyio.getImagePath("newImage.png"));

here newImage.png - file from the Media Manager


change image by click

Posted: Tue Aug 04, 2015 11:27 am
by Mani Maran

Hello Mr. Sergiy Kullibaba
I can't able to figure it out where do i start just give me little more description to do,
whether i wanna edit in events or select action using run javascript and then edit? i understand the syntax but just give an example to clearly understand


change image by click

Posted: Tue Aug 04, 2015 1:17 pm
by Mani Maran

I applied those syntax successfully using js, but nothing happened it remains same what else i do?


change image by click

Posted: Wed Aug 05, 2015 1:03 pm
by Serhii Kulibaba

You should add action "Run JavaScript" on the click "event".
More information in our documentation: https://devcenter.appery.io/documenta...


change image by click

Posted: Thu Aug 06, 2015 10:11 pm
by Mani Maran

Hello Mr.Sergey Kulibaba,

ya it works but if once image changes to second image. it doesn't return back to first image when the panel closes, i set the property through events it doesn't working?


change image by click

Posted: Sat Aug 08, 2015 6:39 pm
by Serhii Kulibaba

You should add handler on event "Panel close" where change image from second to the first.


change image by click

Posted: Sat Aug 08, 2015 9:24 pm
by Mani Maran

i already added those too no improvements, in events if the panel close i set the property from back icon to home icon


change image by click

Posted: Sun Aug 09, 2015 4:34 pm
by Serhii Kulibaba

Could you check are there any errors in console? This (http://devcenter.appery.io/documentat...) should help.