onSubmit script error: TypeError: Cannot read property 'getElementsByTagName' of null

vallamreddyvenu
Giga Contributor

Hi,

In one of our stage environments, one incident is behaving differently. when user click on save/update buttons, the user is getting below error message. It's not allowing the user to perform any action on that page. Below is the error.

find_real_file.png

I know that disabling the "Simultaneous Update Alert" client script will make it go through. But i don't want to use that as this is not happening on other incident. 

Does somebody know why it occurs and how to solve the issue.

 

Thanks,

Venu

8 REPLIES 8

Anurag Tripathi
Mega Patron
Mega Patron

Hi,

Is the isolate script flag on this set to false?

do it if not already.

-Anurag

-Anurag

vallamreddyvenu
Giga Contributor

Hi Anurag,

This has already been set to false.

Thanks,

Venu

Hitoshi Ozawa
Giga Sage
Giga Sage

It's happening because gel('onLoad_sys_updated_on') is returning null.

Separate the statement and add an if statement

var updatedOn = gel('onLoad_sys_updated_on');
if (!updateOn) {
  return;
+
updatedOn = updatedOn.value;

 

And put the whole thing in try catch block.

-Anurag