logo

New Response

« Return to the main article

You are replying to:

  1. Good points David. And to think I call myself a developer....

    There is a lcase equivalent in JS. It would be:

    path = location.pathname.toLowerCase().split('.nsf')[0] + '.nsf/';

    This would present another gotcha however, in that, if the DB lives on a *nix server then the file name is case-sensitive and this would lead to a 404 error.

    There is also a problem in your workaround, where you look for the last "/". If you are at the root level of a database. i.e the homepage and the location is "/dir/db.nsf" the file name returned would be "/dir/". So what's the perfect solution to this then I wonder? I think I'll stick to naming all my DBs in lower case.

    Thanks for the feedback.....

    Jake -CodeStore

Your Comments

Name:
E-mail:
(optional)
Website:
(optional)
Comment: