URL from JSON set to _system

This forum contains topics that were moved from Get Satisfaction
iB3nji
Posts: 0
Joined: Fri Jun 19, 2015 9:05 am

URL from JSON set to _system

Post by iB3nji »

Hi All,

I'm developing a app which pulls blogs from my Wordpress based website.

I've got it all mapped out including the 'URL' of my post pointing to a 'Link' control in Appery.

Issue is I need the "Link" to open as '_system' so when a user clicks it does not open it with-in the app.

Hope this makes sense.

Thanks,
Ben

Serhii Kulibaba
Posts: 147
Joined: Tue Aug 27, 2013 1:47 pm

URL from JSON set to _system

Post by Serhii Kulibaba »

Hello Ben,

If so - please use component label (with blue color and underscore) instead of link. And add handler on click event which open system window

iB3nji
Posts: 0
Joined: Fri Jun 19, 2015 9:05 am

URL from JSON set to _system

Post by iB3nji »

Hi Sergiy,

Thanks for your answer. Could I be really annoying and ask for an example? I'm not 100% sure what you mean sorry.

I'm attached how my 'mapping' looks at the moment ....
Image

iB3nji
Posts: 0
Joined: Fri Jun 19, 2015 9:05 am

URL from JSON set to _system

Post by iB3nji »

Sorry to be a pain just wondering if you've been able to look into this? It's my only remaining issue :)

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

URL from JSON set to _system

Post by Evgene Karachevtsev »

Hello Ben,

We are working on it and will get back to you with the update.

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

URL from JSON set to _system

Post by Yurii Orishchuk »

Hi Ben,

Please try following solution:

  1. Activate your link component.

  2. Add "click" event handler to this component.

  3. Populate it with following JS code:

    pre

    arguments[0].preventDefault();
    arguments[0].stopPropagation();

    var link = jQuery(this).attr("href");
    window.open(link, "_system");

    /pre

    Details: http://prntscr.com/7jsahn/direct

    Regards.

iB3nji
Posts: 0
Joined: Fri Jun 19, 2015 9:05 am

URL from JSON set to _system

Post by iB3nji »

This has worked perfectly thank you Yurri.

The reason I want _system is because when I set it as _blank it does open up within in-app browser which works perfectly and loads up my blog post. However If I click a link within the window and it opens away from my website it says "LoadError" in the in-app browser? Do you know what could be causing this?

Example: If it loads example.com in the in-app browser but when clicking example2.com in the in-app browser it simply causes 'LoadError'.

But thanks for finding me a solution this will be good enough for now :).

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

URL from JSON set to _system

Post by Yurii Orishchuk »

Hi Ben,

Tried following:

1 open google in inappBrowser
2 search anything in inappbrowser with google
3 click on any result to open other domain.
4 Other domain load correctly without any error.

Android 4.1.2

Could you please try the same?

Regards.

Post Reply