Jump to content
wimtracking2

Javascript Not Working on Deployed Datapage on Weebly

Recommended Posts

I was able to get this figured out. I needed to move my code to my footer. 

 

I have deployed an update datapage on Wordpress and the javascript below works fine. However, I deployed it on a Weebly website and it is not working. I have pasted the javascript below and then also the deployment code I put on Weebly. I have other custom javascript that is working on the same datapage, so wondering if the iMask might be the problem?

 

Javascript in the Datapage:

<script src="[@app:iMask/]"></script>

<script type="text/javascript">
document.addEventListener('DataPageReady', function (event) {
 var phoneMask = IMask(
  document.getElementById('EditRecordFax'), {mask: '(000) 000-0000'});
var phoneMask = IMask(
  document.getElementById('EditRecordOffice_Phone'), {mask: '(000) 000-0000'});
var phoneMask = IMask(
  document.getElementById('EditRecordOther_Phones'), {mask: '(000) 000-0000'});
var phoneMask = IMask(
  document.getElementById('EditRecordPrimary_Phone_Number'), {mask: '(000) 000-0000'});
var phoneMask = IMask(
  document.getElementById('EditRecordCell_Phone'), {mask: '(000) 000-0000'});
var phoneMask = IMask(
  document.getElementById('EditRecordHome_Phone'), {mask: '(000) 000-0000'});
var phoneMask = IMask(
  document.getElementById('EditRecordBeeper'), {mask: '(000) 000-0000'});
var phoneMask = IMask(
  document.getElementById('EditRecordOther_Phone'), {mask: '(000) 000-0000'});
});
</script>

 

Datapage embed deployment code:

<script type="text/javascript" src="https://c2axa376.caspio.com/dp/3c194000bfe6c015b6ac4d52b0e2/emb"></script>
<div class="cxkg"><a href="https://c2axa376.caspio.com/dp/3c194000bfe6c015b6ac4d52b0e2">Click here</a> to load this Caspio <a href="http://www.caspio.com" target="_blank" title="Cloud Database">Cloud Database</a></div>
<div id="cb3c194000bfe6c015b6ac4d52b0e2"></div>

 

Edited by wimtracking2
Problem Solved

Share this post


Link to post
Share on other sites

Hi @wimtracking2, Since you have verify that the script is working in the WordPress and I believe this is working also in direct URL of the DataPage. You mighty need to contact the support of Weebly . I have found also some article that have similar issue:

https://community.weebly.com/t5/Site-Editor/JavaScript-function-not-working/td-p/65655
https://community.weebly.com/t5/SEO/JavaScript-not-being-called/td-p/704

Share this post


Link to post
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Loading...

×
×
  • Create New...