Adding javascript event handler for Zoho ASAP Widget


We have installed the Zoho ASAP Widget on our page. That is working as expected.

From their documentation
We can create a button or link that can open/close the widget flyout

var openApp = ZohoHCAsapReady(function(){ ZohoHCAsap.Action("open"); }) 
<span class="demo-btn" onclick="openApp();" > View Demo </span>

or link to specific articles in the knowledge base like in this example code here:

var viewArticle = ZohoHCAsapReady(function(){ ZohoHCAsap.kbArticles.view( { articleId : '305163000000109120' } ); }) 
<span onclick="viewArticle();" > View Demo </span>

I tried putting the "var openApp…." section in a javascript section and the "<span onclick…" in an HTML section on the page I’m trying to host. When I click "View Demo" I get an error in the browser console.

openApp is not a function at HTMLSpanElement.onclick

How do I incorporate this into my page?

Matt Winer 2 months 0 Answers 15 views 0

Leave an answer