Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 8810353
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 14, 20262026-06-14T03:06:07+00:00 2026-06-14T03:06:07+00:00

I need a client side javascript function that always return the path up to

  • 0

I need a client side javascript function that always return the path up to the .nsf that can be used in XPages. e.g http://acme.com/folder1/folder2/mydb.nsf/whatever/whatever

it would be great if I could use the function like this

function getNSFPath(){

}

how do I construct a function like this?

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-14T03:06:08+00:00Added an answer on June 14, 2026 at 3:06 am

    XPages currently doesn’t have a directory structure beyond the nsf. So it is sufficient to look for the last occurrence of / like this:

    function getNSFPath(url) {
        return url.substring(0, url.lastIndexOf('/'));
    }
    

    In a future release that might change, so you want to look for “.nsf” instead. However that’s not a save way either since a directory can contain “.nsf”. Also a admin could decide to mask the NSF with an URL redirection, so you better consider an architecture where you don’t depend on such a function

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I need to call a Javascript function from the server side in Client side.
We have a client side application (Java/Swing) that we need an HTML rendering control
Why do I need the json jersey dependencies on client side for service.path(rest).path(object).path(id).accept(MediaType.APPLICATION_JSON).get(ObjectDTO.class); but
I have a view that contains a javascript function that i need to init/call
I am trying to replace postbacks with javascript client side processing whenever I can
I'm working on a client-side webapplication that makes heavy use of JavaScript and Ajax
I have a function defined in AS3 that's gonna be called from client side
I need a client-server encryption solution for web transfer, (i.e. signed and encrypted client-side,
I need to build some client side code which follows this use case: An
I need to know if all the client-side validator checks have succeeded, or if

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.