1837
Views
9
Comments
Solved
An exception occurred in the client script. Error: Cannot set property...
Question

I have to say that sometimes the exception error reporting has a lot to be desired:

"An exception occurred in the client script. Error: Cannot set property 'elementsToValidate' of null"

Could someone explain what has happened here and try to point me in the right direction to solving this.

Regards,

Chris.

2019-09-17 09-11-00
João Pedro Abreu
Staff
Solution

That's an error executing JavaScript, apparently in some sort of form validation. Maybe you have some validation implemented that's referring to an element that's not present in the page.

2020-02-28 09-46-54
Eduardo Jauch

Hello Christopher,

This is a browser error related to a NULL object that was being used.
Without knowing what are you doing, and how are your page and code, will be almost impossible to help you.

Cheers.

2019-09-17 09-11-00
João Pedro Abreu
Staff
Solution

That's an error executing JavaScript, apparently in some sort of form validation. Maybe you have some validation implemented that's referring to an element that's not present in the page.

UserImage.jpg
Christopher White

Thank you.  I seem to have sorted it out.    I still find the exception messages hard to understand!!!

2020-02-28 09-46-54
Eduardo Jauch

Hi Christopher,

They are hard to understand, even for people that have a lot of experience.
We end up being used to them, but they can be hard to understand the first time.

By the way, what was the cause of the error? :)

Cheers.

UserImage.jpg
Christopher White

Not entirely sure.  I am doing a lot of work with anonymous users adding data to a form and then that same user coming back to add more data to the existing form  It was something to do with a validation but have not had it happen again.  Thank you for your time, much appreciated.

Regards,


Chris.

UserImage.jpg
Dhiranjan Sahu

If you are refreshing a widget using "Ajax Refresh" which is not rendered on page (might be due to if/else condition). That time you may see this error.

UserImage.jpg
Sten Hasselrot

Dhiranjan Sahu wrote:

If you are refreshing a widget using "Ajax Refresh" which is not rendered on page (might be due to if/else condition). That time you may see this error.

This was the issue and solution to my occurrence.


2020-09-15 00-23-00
CoverWeb

Hi Christopher White

"An exception occurred in the client script. Error: Cannot set property 'elementsToValidate' of null"


I was receiving the same error.

I found my issue was that I was running an ajax refresh on a form.
But for that step the form section was skipped. SO when I ajax refreshed.

The form had no data to submit and when I ajax refreshed the form. I received the error.
I corrected my ajax refresh to refresh a container and my error went away.
This way I removed the extra I didn't need.

2020-04-13 21-40-18
Mohsin Khan

You are refreshing (ajax-refresh) any container which is not rendered on page.... If that Ajax-Refresh of that container is not required, remove that from action....

Community GuidelinesBe kind and respectful, give credit to the original source of content, and search for duplicates before posting.