Forum Moderators: open
I recently had to do exactly this, also on a .gov site, it was a requirement. You are best *not* to do this using Javascript because it is then Javascript-dependent. You want some sort of server-side script to effect the exit message. A perl-y solution:
<a href="exit.cgi?url=http://www.some-offsite-link.com">some-offsite-link.com</a>
exit.cgi then displays something like
<p>You are exiting the $sitename web site. We claim no responsibility over third-party sites.</p><p> <a href="$data{'url'}">I understand and wish to move on</a>.</p>
It's an easy thing to do in perl, php, asp, coldFusion, etc., and maintains accessibility. My requirement was also "no new windows."