Notifications

8 views

Description

There has been occasions where a mysterious pop up will inexplicably appear on a form. This may happen on form load or after a sur makes an update. The situation may vary. The popup will not interfere with the actions of the users but it causes confusion.

Cause

Developers add Javascript alert messages while developing for debugging purposes. And sometimes they forget to take out the alerts. This will cause a popup to appear to the users causing confusion of the errors was something they did.

Resolution

To solve the issue you can:

1. Open the console tab and enter the following to the console tab:

var old = alert;

alert = function() {
console.log(new Error().stack);
old.apply(window, arguments);
};

 

2. Now try and replicate the issue.

this should throw the stack error in the console and it should have some hints as to which script caused this issue and it should look something like this:

Error
at alert (<anonymous>:4:15)
at validateSizeandExt (eval at evalScript (js_includes_doctype.jsx?v=08-12-2019_1850&lp=Sun_Sep_15_11_40_44_PDT_2019&c=19_391:84), <anonymous>:172:2)
at checkAndSetAttachButton (eval at evalScript (js_includes_doctype.jsx?v=08-12-2019_1850&lp=Sun_Sep_15_11_40_44_PDT_2019&c=19_391:84), <anonymous>:159:24)
at HTMLInputElement.onchange (change_request.do?sys_id=c83c5e5347c12200e0ef563dbb9a7190&sysparm_record_target=change_request&sysparm_record_row=5&sysparm_record_rows=153&sysparm_record_list=ORDERBYDESCnumber:1)

 

3. Now you can go look for the term "validateSizeandExt" and test if the alert in this function is the one with the issue. You can do so by commenting out the alert in the function and then trying to replicate. If the issue is not replicable then you now this is the alert causing the issues.

 

Additional Information

https://stackoverflow.com/questions/7808665/how-to-find-out-where-the-alert-is-raised-from

Article Information

Last Updated:2019-09-23 09:58:18
Published:2019-09-23