February 10, 2017 at 9:46 pm
#10005
You should be able to add a javascript onclick()
handler to the button that navigates to the omnis://
url. I spiked out a solution that sets a hidden anchor’s href
and fires a click on it:
HTML
<html><head>
<script>function openInOmnis(payload) {
var omnisLink = document.getElementById('omnisLink');
omnisLink.href = 'omnis://' + payload;
omnisLink.click();
}</script>
</head><body>
<a id="omnisLink" target="_blank" style="visible: false;"></a>
<input type="button" value="Say foo" onclick="openInOmnis('foo');"/>
<input type="button" value="Say bar" onclick="openInOmnis('bar');"/>
</body></html>
The Omnis code from my example above is unchanged.