Dirty form focus in javascript log

Akhil Nair1
Tera Expert

Hi All,

My onSubmit client script to display a message on a table is not working. When I click, the form is getting submitted as it is. When I enabled javascript log I could see all onload client scripts being called but when on submit, the log shows "dirty form focus" and the the script is not being called in console

 

Kindly guide me here.

4 REPLIES 4

Ankur Bawiskar
Tera Patron
Tera Patron

Hi,

please share the script

Regards
Ankur

Regards,
Ankur
✨ Certified Technical Architect  ||  ✨ 9x ServiceNow MVP  ||  ✨ ServiceNow Community Leader

Akhil Nair1
Tera Expert
function onSubmit(){ If(g_form.getValue('field1')=='TM'){ If(g_form.getValue('field2')=='''&&g_form.getValue('field2')=='''){ alert('message'); } } }

@Akhil Nair 

the script looks fine.

just check any other onload client script is causing the issue or error

Regards
Ankur

Regards,
Ankur
✨ Certified Technical Architect  ||  ✨ 9x ServiceNow MVP  ||  ✨ ServiceNow Community Leader

@Akhil Nair 

Thanks for marking my response as helpful.

Let me know if I have answered your question.

If so, please mark appropriate response as correct & helpful so that this thread can be closed and others can be benefited by this.

Regards
Ankur

Regards,
Ankur
✨ Certified Technical Architect  ||  ✨ 9x ServiceNow MVP  ||  ✨ ServiceNow Community Leader