Find your people. Pick a challenge. Ship something real. The CreatorCon Hackathon is coming to the Community Pavilion for one epic night. Every skill level, every role welcome. Join us on May 5th and learn more here.

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

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

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