<br />// this code could be in your JS header or Js include file.
<br />path = window.location.pathname.toLowerCase();
<br />nsfPos = path.indexOf(".nsf");
<br />path = path.substring(0, nsfPos+5);
<br />// path now contains the relative url of the window upto ".nsf/"
<br />if ( confirm('Please confirm this very dangerous Action.') )
<br />f = document.forms;
<br />action = path + "YourAngentsName?OpenAgent";
I’m not sure if I “borrowed” this for someone else years ago or invented myself. Part of the reason for posting this is so I don’t forget it.
Also Search Domino posted a similar tip to fill a more complicated need, from which I’m sure I can learn a few tricks.