0

We use Zoho SalesIQ for live chat and I can add custom fields to the loading using javascript, however, I can't do my usual:

 $("#device").val("test");

or

 document.getElementById("device").value = "test";

To the remotely loaded chat box. I presume because it's loaded externally and perhaps can't be accessed.

The computed javascript for the live chat comes out like

<div custom = "Device"
type = "url"
customid = "Device"
custombx = "true" > < input type = "text"
class = "siq-input-text-box"
docblur = "custominput"
purpose = "custom"
visibility = "both"
placeholder = "We'll populate this automatically if required"
id = "device"
mandatory = "false"
custom = "Device"
name = "Device"
data - validate = "optional url"
autocomplete = "off"
maxlength = "100"
minlength = "0"
info = "url"
style = "display: inline-block;" > < /div>

But as I'm loading in the live chat widget from an external source I can't seem to access the textbox to fill it.

Is there a different way to achieve this?

MissCoder87
  • 2,669
  • 10
  • 47
  • 82

1 Answers1

0

Those kinds of chat widgets usually use their own JS to load themselves in an iframe. That seems to be true of this one as well based on its code, and it looks like the iframe content is coming from their domain, so you won't be able to mess with the DOM. See also this and this.

Zac Anger
  • 6,983
  • 2
  • 15
  • 42