Jump to content

Some scripts stop working with latest release upgrade?


Recommended Posts

It seems several scripts that I have successfully implemented (thanks to the forum for all help on that) sems to have stopped working with the new release. Could this be for real? If true I need to start all over creating essential functionality...

Does anyone know?

/KG

One example is an error that hide the submit button in a form:

<script type="text/javascript">

document.querySelector('[id*=Submit]').style. Display = 'none';

document.addEventListener('DataPageReady', function (event) {
document.getElementById("InsertRecordFormStatus").addEventListener('change', function() {

if (document.getElementById("InsertRecordFormStatus").value != 'Yes')
{
 document.querySelector('[id*=Submit]').style. Display = 'none';
}
else {
 document.querySelector('[id*=Submit]').style. Display = 'inline';
}
});
});
</script>

Link to comment
Share on other sites

Hi
Can you please try following code:
 

<script type="text/javascript">

document.querySelector('[id*=Submit]').style.display = 'none';

document.addEventListener('DataPageReady', function (event) {
document.getElementById("InsertRecordFormStatus").addEventListener('change', function() {

if (document.getElementById("InsertRecordFormStatus").value != 'Yes')
{
document.querySelector('[id*=Submit]').style.display = 'none';
}
else {
document.querySelector('[id*=Submit]').style.display = 'inline';
}
});
});
</script>

 

Link to comment
Share on other sites

10 hours ago, RagnarIllyrian said:

Hi
Can you please try following code:
 

<script type="text/javascript">

document.querySelector('[id*=Submit]').style.display = 'none';

document.addEventListener('DataPageReady', function (event) {
document.getElementById("InsertRecordFormStatus").addEventListener('change', function() {

if (document.getElementById("InsertRecordFormStatus").value != 'Yes')
{
document.querySelector('[id*=Submit]').style.display = 'none';
}
else {
document.querySelector('[id*=Submit]').style.display = 'inline';
}
});
});
</script>

 

Many thanks @RagnarIllyrian! I discovered the typos and have entered the correct script and it works fine. It seems that the script also disables the submit function, even though there is no instruction specifically for it.

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...
 Share

×
×
  • Create New...