onSubmit script error: TypeError: Cannot read property 'getElementsByTagName' of null
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
11-27-2020 06:30 AM
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.
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
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
11-27-2020 07:20 AM
Thanks Guys.I tried the above. But still that's not working
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
11-27-2020 11:29 PM
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.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
11-30-2020 09:53 AM
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
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
11-30-2020 02:34 PM
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/