Nureddin Akpinar
Posts: 0
Joined: Sat May 24, 2014 12:04 pm

change photos

Hi

i want to add four different picture to an image.

the picture should change with another picture when i click to the picture . how can i do that can you very much from advance

var imageNumber = parseInt(localStorage.getItem("imageNumber"));
var image = '';
switch(imageNumber){
case 1:{
image = "LinkToImage1.jpg";
break;
}
case 2:{
image = "LinkToImage2.jpg";
break;
}
case 3:{
image = "LinkToImage3.jpg";
break;
}
case 4:{
image = "LinkToImage4.jpg";
break;
}
}

localStorage.setItem("imageNumber", imageNumber + 1); Image

Igor
Posts: 0
Joined: Tue Apr 02, 2013 12:05 pm

change photos

Hello,

You can set image to the image component using below code. You can execute this code on button click event.

pre
Apperyio("mobileimage").attr("src","ImagePath");
/pre
where ImagePath - path to the image.

Getting image path:
http://devcenter.appery.io/documentat...

Nureddin Akpinar
Posts: 0
Joined: Sat May 24, 2014 12:04 pm

change photos

Hi igor

Thanks for the reply.
I tried didn't work.
where this Code apply.

Kateryna Grynko
Posts: 0
Joined: Thu Nov 15, 2012 9:13 am

change photos

Hi Nureddin,

Run this JS on button Click event. Make sure you use the correct names.
How do you do this?

Nureddin Akpinar
Posts: 0
Joined: Sat May 24, 2014 12:04 pm

change photos

I added the following code to the click event of the image, but it's not.
I want to change the image of each click.
would you help me in detail.

Apperyio ("mobileimage") attr ("src", "ımagepath");

Kateryna Grynko
Posts: 0
Joined: Thu Nov 15, 2012 9:13 am

change photos

Hi Nureddin,

'imagepath' must contain the image path. What image do you use? Please make sure you use correct names.

Nureddin Akpinar
Posts: 0
Joined: Sat May 24, 2014 12:04 pm

change photos

Png extension added to the picture I'm using for app

Evgene Karachevtsev
Posts: 12
Joined: Mon Apr 28, 2014 1:12 pm

change photos

Hello,

You should run this JS code on click event:

codeAppery("mobileimage_33").attr("src",Appery.getImagePath("Proxy.PNG"));/code

where mobileimage_33 is the name of image component and "Proxy.PNG" is the name of image file that you uploaded via Media Manager: http://devcenter.appery.io/documentat...

Nureddin Akpinar
Posts: 0
Joined: Sat May 24, 2014 12:04 pm

change photos

Hi
I added the code you gave, I did everything right.
but it's not.
It shows all the pictures I added.
I want to show a picture of every click
detailed help please

Yurii Orishchuk
Posts: 0
Joined: Fri Feb 14, 2014 8:20 am

change photos

Hi Nureddin.

Currently it's hard to help you cause of your problem is not clear for us now

Please provide us public link for your application.

And provide full steps how we can reproduce your issue.

Also please describe in details what you want to implement. Use screen shots to clarify it.

Thanks & regards.

Return to “Issues”