Click to See Complete Forum and Search --> : Application Name from Address Bar


sachin123
11-25-2003, 04:35 AM
Hi,

I want to get the application name from the Address bar from the browser.Current Code which i have is

For example:

http://127.0.0.1/myapp/test.htm?id=sss;
http://127.0.0.1/myapp/test123.htm?id=234&js=3454334;


sAppName = window.location.pathname.substring(0,window.location.pathname.indexOf("/",1)+1);

Finally sAppName must be

sAppName =/myapp/

The above code works fine on most of the cases, but it
gives a access denied on Some Win XP professional m/s.

Is there any way I can get the below output by anyother method.


sAppName =/myapp/

gil davis
11-25-2003, 07:44 AM
An "access denied" error is a security violation message. But maybe you already knew that.

sachin123
11-25-2003, 07:50 AM
Thats it is what I want to know??
why does access denied error occur on some m/s.
Also I wanted to know any other way to get /myapp/ value.