Chat button in a webapp

I am trying to integrate a little chat button in a web app I am working at. I’ve found this --> https://www.jivochat.com/
Looks ok, works ok… it’s free… all fine, except… To make it work I need to insert code in the app HTML header which makes the chat a button available in all the website (all the pages). I just want it in the main page. I am really not Javascript savvy… and I don’t want to develop a whole new custom chat app if it’s already available online for free (and it’s probably better than what I would achieve)
Is this fixable ?
Any ideas ?
alternatives ?
thanks!

You may want to try placing the code in a page source onto the webPage.

Hi Michel thanks for your reply.
You mean using a WebPageSource control ?
It doesn’t work as the code has to be in the header (before the body as stated in their documentation), and that control inserts the code in the body… (Afaik)

Well, I fixed it by using another chat widget that allows for button linking and works with the htmlviewer

https://www.tawk.to/

It’s free and it’s pretty adaptable…

[quote=437739:@Roman Varas]Hi Michel thanks for your reply.
You mean using a WebPageSource control ?
It doesn’t work as the code has to be in the header (before the body as stated in their documentation), and that control inserts the code in the body… (Afaik)[/quote]

Javascript does not have to reside in the header. It can be pretty much anywhere in the DOM. I am convinced if you only had tried, it would have worked.

Hi Michel, thansk for your reply… believe me, I’ve tried but could not make it work.

This is the java code I’ve been provided (I removed the widget id…

[code]

[/code]

Here’s what I did:

  1. Create en empty web project and in the default webpage inserted a PageSource control.
  2. In the inspector in “bahavior” I tried inserting the Jave code Before Content and also I’ve tried After content. Nothing worked

Then, in the same project inserted the Java code in tha app HTMLHeader… and voila… it’s working… The thing is I do not want the widget on every page :frowning:

Thanks
R

I understand. The code hooks a listener to every page load event.

I see you found another solution. Great.

Just to be clear, the reason you are having trouble here is that Xojo’s concept of a “webpage” is different from a traditional web page. We load all of the header and framework info once and then swap out what the user sees at any given time as opposed to reloading everything from scratch every time (which is what this button seems to expect). If you want to use this component, you’ll need to hide and show it on your own, assuming they allow it to be hidden.