Page 1 of 2

How to link the photo I have on popup to a specific place on a website

Posted: Fri Apr 04, 2014 1:53 am
by Paco Lau

I want to nagivate to a SPECIFIC place on a website by clicking the picture. Can someone help me?


How to link the photo I have on popup to a specific place on a website

Posted: Fri Apr 04, 2014 2:52 am
by Alena Prykhodko

Hi Paco,

1 Select image component in design mode.
2 In image component properties set "className" property to "yourImageLink".
3.1 To navigate to website On Image component Click event add Run JavaScript action with the following code:
pre//Replace http://appery.io with your URL
window.open("http://appery.io", "_blank");/pre
3.2 To navigate to app page On Image component Click event add Run JavaScript action with the following code:
pre
//You should replace "screen28" with your screen name.
navigateTo("screen28");/pre
4 Create new CSS asset with code:
pre
.yourImageLink{
cursor: pointer;
}/pre


How to link the photo I have on popup to a specific place on a website

Posted: Fri Apr 04, 2014 9:38 am
by Paco Lau

Hi Alena,

I tried the code on my app, but when I click on the photo it still goes to the top of the website, and I want it to go to the MIDDLE of the website. So for example when I click on the photo I will go to "To navigate to app page" of this question and not the top of the page. Please help!


How to link the photo I have on popup to a specific place on a website

Posted: Fri Apr 04, 2014 7:53 pm
by Maryna Brodina

Hello!

On click you navigate to external site or app page?
1) If external site, check if there are anсors. You can navigate to this anсors like prehttp://example.com#ancorName/presee name parameter (id for html5) here https://developer.mozilla.org/en-US/d...
There are no other ways with external site
2) If you navigate to your html5 app page, save into localStorage element name where you need to navigate and on page show event using JS scroll app ti the element you need.


How to link the photo I have on popup to a specific place on a website

Posted: Sat Apr 05, 2014 6:48 am
by Paco Lau

So I've tried the code, but do I add the code on number 4 to the code with number 3 or where should I put the code?


How to link the photo I have on popup to a specific place on a website

Posted: Sat Apr 05, 2014 6:51 am
by Alena Prykhodko

Put it in CSS asset, select Create New CSS (from Project view)
http://docs.appery.io/documentation/w...


How to link the photo I have on popup to a specific place on a website

Posted: Sat Apr 05, 2014 6:56 am
by Paco Lau

I used the code, but when I click on the image, it still goes to the top of the page, not directly to the image in the page. How can I go directly to the image not to the top of the page?


How to link the photo I have on popup to a specific place on a website

Posted: Mon Apr 07, 2014 12:12 am
by Alena Prykhodko

Hello,

Please describe in detailes with screen shots what you want to do.
Not sure we understand your goals.


How to link the photo I have on popup to a specific place on a website

Posted: Mon Apr 14, 2014 1:01 am
by Paco Lau

OK so I want my pictures on my app to go to this website: http://pacolau.wix.com/phone-chooser#...

This is a website where I can search about phone specs. There will be a picture of the LG Nexus 5 when you scroll down, and I want the Nexus 5 picture on my app to navigate to the LG Nexus 5 picture on my website when I click on the picture on my app. Is that possible?


How to link the photo I have on popup to a specific place on a website

Posted: Mon Apr 14, 2014 1:20 am
by Rick O'Connor

@Paco

On your website put an anchor at the point you want to link to.

code<a name="nexus5"></a> /code

Your link from the app will be. http:www.example.com/#nexus5