Android Question Webview: How To Tell If Link Is A Popup?

androit

Member
Licensed User
Longtime User
Is there any way to tell which one of these 2 links in webview was clicked?

HTML:
<html>
...
<a href="http://google.com">Click here for Google</a>
<p>
<a href="http://google.com" target="_blank">Click here for Google in new window</a>
...
</html>

Both are links to the same url but one is a popup.

Thank you.
 

barx

Well-Known Member
Licensed User
Longtime User
Are you serious?
 
Upvote 0

androit

Member
Licensed User
Longtime User
I wouldn't waste my time to post here if I weren't serious.

The above html code is just an example.

See, the webpages being loaded to Webview are determined by the user, so I have no control over what is loaded. However, after a link is clicked, the next steps my app will take are determined by whether the link is a regular link or a popup.
 
Upvote 0

androit

Member
Licensed User
Longtime User
Sorry, my problem might be very simple, but I'm not a professional programmer so I need help here. Right now when I click a link, whether it's a regular link or a popup, it just opens in the same webview browser, so I can't tell, through code, whether it is supposed to be a popup or not.
 
Upvote 0

lemonisdead

Well-Known Member
Licensed User
Longtime User
I am not a Webview expert but have you checked if OverrideURL won't return any usable value ?
 
Upvote 0

androit

Member
Licensed User
Longtime User
I've looked at the properties and events for Webview but could not find anything regarding popups. I've also looked at Webviewextender but nothing there either. In the old VB6, the Webbrowser object used to have an event called "OnNewWindow" which is what I'm trying to look for in B4A.
 
Upvote 0
Cookies are required to use this site. You must accept them to continue using the site. Learn more…