We're reclaiming inactive PDIs to keep them available for active builders. Learn what's changing, who's affected, and how to protect your work. Read More

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

vallamreddyvenu
Giga Contributor

Thanks Guys.I tried the above. But still that's not working

By "not working", does this imply that there's still an error?

My bad on my earlier reply. "+" should have been a "}".

try {
  var updatedOn = gel('onLoad_sys_updated_on');
  if (!updateOn) {
    return;
  }
  updatedOn = updatedOn.value;
} catch (e) {
}

 

Also, check the source code of the incident page to make sure there is a tag named "onLoad_sys_updated_on". It doesn't seem to be OOTB tag so it may be it was not added to this page. Since it doesn't exist, it may be causing the error.

Hi Hitoshi,

 

Thanks for assistance. Can you please help to elaborate below line. I couldn't get your point here.

Also, check the source code of the incident page to make sure there is a tag named "onLoad_sys_updated_on". It doesn't seem to be OOTB tag so it may be it was not added to this page. Since it doesn't exist, it may be causing the error. 

Thanks,

Venu

Open the incident page in question and right click on the page and select "View page source".

Press Ctrl + F keys to bring up the search box. Enter "onLoad_sys_updated_on". This should highlight all places where "onLoad_sys_updated_on" is in a page. Find if there is a tag with id = "onLoad_sys_updated_on".

gel() is a shorthand notation for getElementById(). If the id doesn't exists, it'll return null.

FYR:

https://www.howtogeek.com/416108/how-to-view-the-html-source-in-google-chrome/