February 10, 2017 at 8:40 pm
#10003
Yes. In the HTML document add an anchor tag with a custom scheme, like omnis://
. Set the target to _new
and this will allow you to trap the event on oBrowser’s evBrowserOpenUrl
. You can add extra data to the URL and parse it out of pURL
in Omnis.
For example:
HTML
<html><body>
<a href="omnis://foo" target="_new">Say foo</a><br/>
<a href="omnis://bar" target="_new">Say bar</a>
</body></html>
oBrowser.$event
On evBrowserOpenUrl
If left(pUrl,8)="omnis://"
Calculate lcPayload as mid(pUrl,9)
OK message {[lcPayload]}
End If
It’s key to set the target to _new
or the Omnis even won’t fire. _blank
works as well.