How to create a link to close the current window?

MG Casey
Mega Sage

Hi,

With my instance's SSO restrictions, some links within ServiceNow I have to force to open in a new window.

Does anyone know an easy script I can use the close the previous window? I've been trying this to no luck:

<a href="nav_to.do?uri=u_incident_rtsd.do?sys_id=${sysparm_sysid}%26sysparm_category=${sysparm_callreasoncode}%26sysparm_subcategory=${sysparm_callreasonsubcode}%26sysparm_u_training_issue=${sysparm_training}%26sysparm_termid=${sysparm_termid}%26sysparm_impact=3" onClick="javascript:window.close()" target="_blank" style="color:white">

Thanks!

MG

1 REPLY 1

justin_drysdale
Mega Guru

Your anchor tag isn't closed.   Try:


<a href="javascript:window.open('','_self').close();">close</a>