Hi JavaGeeks, i am trying to get context path of my Applcation. But it is showing errors in that. Can you please mention the way how to get context path in javascript functions.

Ok. Then how can i get the context path.?
I have a code like this.

case 6: {//print
				LeftPosition = (screen.width) ? (screen.width-290)/2 : 0;
				TopPosition = (screen.height) ? (screen.height-240)/2 : 0;
				var _h=options.values.length*23;
				settings = 'height='+_h+',width=245,top='+TopPosition+',left='+LeftPosition+',scrollbars=no,resizable';
				saveField = options;
				win = open('/dnweb/pages/favorite.jsp','Print_Favorite_win',settings);
				win.focus();
				break;
			}

i have to change

/dnweb

context as dynamically.

What do you mean by 'context path' - the tree of routines which calls the current one?

Ok. Then how can i get the context path.?
I have a code like this.

win = open('/dnweb/pages/favorite.jsp','Print_Favorite_win',settings);
				win.focus();
				break;
			}

i have to change

/dnweb

context as dynamically.

You can use a variable value concatenation with the string path value.

var contextPath = "";
    contextPath = "\/dnWeb2"; //the value assignment is done for illustration purpose here
            win = open( [B]contextPath[/B] + '/pages/favorite.jsp','Print_Favorite_win',settings);