Object loads in some cell phones and in others does not load

Asked

Viewed 41 times

0

Good afternoon, my site is with the object below in line 12965:

  <script>
  var _cFieldFrame = document.getElementById("customFieldFrame_67");
  _cFieldFrame.src = "//widgets.jotform.io/imagePicker/?qid=67&ref=" + encodeURIComponent(window.location.protocol + "//" + window.location.host);
  _cFieldFrame.addClassName("custom-field-frame-rendered");
            </script>

But this object carries in some cell phones, and in others does not load, can help me?

In the image below shows the print of a mobile phone that loaded the image properly

inserir a descrição da imagem aqui

In the image below shows the print of a mobile phone that did not load the object inserir a descrição da imagem aqui

1 answer

0

The function addClassName does not exist natively in Javascript, in DOM you have to set the property .className.

I believe what you want would be something like:

<script>
var _cFieldFrame = document.getElementById("customFieldFrame_67");

_cFieldFrame.src = "//widgets.jotform.io/imagePicker/?qid=67&ref=" + encodeURIComponent(window.location.protocol + "//" + window.location.host);
_cFieldFrame.className += " custom-field-frame-rendered";
</script>

Browser other questions tagged

You are not signed in. Login or sign up in order to post.