UI Macro containing an external url link

<?xml version="1.0" encoding="utf-8" ?>
<j:jelly trim="false" xmlns:j="jelly:core" xmlns:g="glide" xmlns:j2="null" xmlns:g2="null">
 
<b style = "color: #DD3197" >Data Protection</b><br/>

Company is committed to protecting the privacy and security of your personal information. <a href='' onclick="event.preventDefault();gdprRef('${gs.getMessage('gdpr')}');">privacy notice</a> sets out how we process your data.

<script>
 
var myGDPRWindow;

function gdprRef(url){

if(g_form.modified){
g_form.modified=false;
}
var res=confirm('Do you wish to view the privacy notice?');
if (res){

     myGDPRWindow=window.open(url, "s", "resizable=yes, toolbar=no, location=no, directories=no, status=no, menubar=no, scrollbars=yes, copyhistory=no").blur();
     
g_form.modified=true; //--prevent fields from blanking in ServiceNow
}
}

</script>
</j:jelly>

Comments

Popular posts from this blog

Running transform maps asynchronously

GlideRecord setValue

Post a command to the ECC queue for the mid server to initiate a powershell file copy