Hi I tried to get the base URL and file path from my windows URL..But I cant get it..Please correct me..
The URL is:
http://sample.com:30023/portal/site/samples/index.jsp
The current output is: http://sample.com:30023/index.jsp?
The required output is: http://sample.com:30023/portal/site/samples/
Code used :
var baseURL = location.protocol + "//" + location.hostname + (location.port && ":" + location.port) + "/";