First, when I tried to implement the function I ran into the problem that some
files end with ".NSF", not ".nsf". Say, for example, my pathname is
"/bob/giggy.NSF: and the url passed in is "pagetoopen", I'd get
"/bob/giggy.NSF/pagetoopen.nsf" when using:
Second, beware of the the "default target for links in frame" when working with
framesets. I called the function from within anchor tags on a page that served
as the source of the "left" frame. I wanted all of the links to open in the
"right" frame. No matter how I wrote the "target" variable, the function would
not work until I turned off the "default target" property for the "left" frame
(it had been set to "right").
Just a couple of things caveats. It's a great function that has enabled me to
replace forms that I had been using with pages.
First, when I tried to implement the function I ran into the problem that some files end with ".NSF", not ".nsf". Say, for example, my pathname is "/bob/giggy.NSF: and the url passed in is "pagetoopen", I'd get "/bob/giggy.NSF/pagetoopen.nsf" when using:
path = location.pathname.split('.nsf')[0] + '.nsf/';
I don't know whether or not there are ucase and lcase equivalents in JavaScript (I am curious). My solution was to replace the line above with:
path = location.pathname.slice( 1, location.pathname.lastIndexOf("/"))
Second, beware of the the "default target for links in frame" when working with framesets. I called the function from within anchor tags on a page that served as the source of the "left" frame. I wanted all of the links to open in the "right" frame. No matter how I wrote the "target" variable, the function would not work until I turned off the "default target" property for the "left" frame (it had been set to "right").
Just a couple of things caveats. It's a great function that has enabled me to replace forms that I had been using with pages.
Thanks,
David