Jump to content

Javascript not working on deployed site but works in preview


Recommended Posts

I have the following code to automatically check a yes/no if there is a value in a field.  It works when I preview it in Caspio but when it's deployed to my Weebly site and live its not working.  Any ideas?

 

Quote


<script>
function fb()
{
if (document.getElementById("EditRecordhrs_removed").value)
{
document.getElementById("EditRecordhrs_ended").checked=true;
}
else
{
document.getElementById("EditRecordhrs_ended").checked=false;
}
}
document.getElementById('Mod0EditRecord').onmouseover = fb;
</script>

 

 

Link to comment
Share on other sites

On 6/22/2017 at 0:51 PM, mdav20 said:

I have the following code to automatically check a yes/no if there is a value in a field.  It works when I preview it in Caspio but when it's deployed to my Weebly site and live its not working.  Any ideas?

 

 

Perhaps script executes before the datapage is loaded. Try changing the first line of code:

window.onload = function fb()

Link to comment
Share on other sites

  • 3 weeks later...
On 6/29/2017 at 10:02 AM, Mathilda said:

Perhaps script executes before the datapage is loaded. Try changing the first line of code:

window.onload = function fb()

Sorry for the delay, I tried this and still having the same problem. 

 

Thank you

Link to comment
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...