#1 2016-04-05 21:00:42

tin
Member
Registered: 2016-03-20
Posts: 173

How to prevent OpenNewWindow Event

I have a question.In your googlemap sample.It use IFrame to show a map.But if user click some link in "Iframe".It will open new window.How to prevent it from open new window browser?(Take no action at click or open in IFrame)

Offline

#2 2016-04-05 21:41:50

David
Admin
From: Alcobendas, Madrid, Spain
Registered: 2015-04-21
Posts: 1,706
Website

Re: How to prevent OpenNewWindow Event

Hello tin,

In principle, a link in an "iframe" are opened in the same iframe, except if the link have the "target='_blank'" attribute. In this case the link are opened in a new window or browser tab. I try with the "Show larger map" link which appear in the Google Maps sample and, in my phone, the link is simply ignored (?).

Certainly I am not quite sure how to proceed. Maybe we can try to search a way in order to tell the map to don't show that link. This can be the best possible solution, but I don't know if it possible tin... This things happend when we uses certain thirdparty services. In other words, if we use own our iframe contents, then we can take care about what exactly is shown and how the links are opened.

Sorry if I can't tell you more at this time.

Offline

#3 2016-04-05 22:20:53

tin
Member
Registered: 2016-03-20
Posts: 173

Re: How to prevent OpenNewWindow Event

Thanks for answer,David.If It cannot,then I will try another plugin
https://github.com/mapsplugin/cordova-plugin-googlemaps

Ps.Will made another sample for everyone too.

Offline

#4 2016-04-05 22:25:18

David
Admin
From: Alcobendas, Madrid, Spain
Registered: 2015-04-21
Posts: 1,706
Website

Re: How to prevent OpenNewWindow Event

Hello,

Yes; another possible way is to use another API instead the "Embedded" one. Apparently the plugin you mentioned uses a more complete API, then probably we can control a little more what appear in the map. If you need any help, please, post it here or open a new forum's thread tin. Ok?

Offline

#5 2016-04-06 07:39:10

tin
Member
Registered: 2016-03-20
Posts: 173

Re: How to prevent OpenNewWindow Event

Ok.Close this topic I will upload it in new thread when I finish.Thanks

Offline

#6 2016-04-06 13:39:33

David
Admin
From: Alcobendas, Madrid, Spain
Registered: 2015-04-21
Posts: 1,706
Website

Re: How to prevent OpenNewWindow Event

No problem. smile

Offline

#7 2016-04-07 07:57:12

tin
Member
Registered: 2016-03-20
Posts: 173

Re: How to prevent OpenNewWindow Event

Again,Can we detect event that show OpenNewwindow?

Offline

#8 2016-04-07 13:26:40

David
Admin
From: Alcobendas, Madrid, Spain
Registered: 2015-04-21
Posts: 1,706
Website

Re: How to prevent OpenNewWindow Event

Hello,

Sorry, can you explain a little more about tin?

Offline

#9 2016-04-07 15:19:33

tin
Member
Registered: 2016-03-20
Posts: 173

Re: How to prevent OpenNewWindow Event

I mean,Did we have any event that will detect if new browser window have show?

Offline

#10 2016-04-07 15:24:18

David
Admin
From: Alcobendas, Madrid, Spain
Registered: 2015-04-21
Posts: 1,706
Website

Re: How to prevent OpenNewWindow Event

Hello,

If the window is opened by certain "link" (like the Google Map's one) then I don't know any way to be advised when the window is opened. Only if we open an HTML page in another window, we can use the "load" event, for example, but probably this is not what you wanted right now...

Offline

#11 2016-04-07 15:43:52

tin
Member
Registered: 2016-03-20
Posts: 173

Re: How to prevent OpenNewWindow Event

Ok.Thanks for answer,David.

Offline

Board footer

Powered by FluxBB


Copyright ©2018 DecSoft. All rights reserved.