• Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 161
  • Last Modified:

Javascript - Open Window question

I have a visual studio 2010 solution.  
It has 3 applications in it, all in C#.

The main application is called MainWeb.  The second applicaiton is called ECSMT.  The third is called CES.

On the web the directory structury has the contents of MainWeb at the root, then ECSMT and CES as directories off of the root.
The issue I am having is when I try to open an aspx page from the main root from within the ECSMT folder it seems that I cannot.  

My function is simple.  
function ShowViewForm(id) 
            window.open("/ECSMT/OrderDetail.aspx?OrderNumType=" + id);

Open in new window

it works for opening pages i have within the ECSMT folder,  how do I make it work for pages stored above the ECSMT folder?  

When I used the ~ character i get back the error that the page \ECSMT\~\OrderDetail.aspx does not exist.  

Thank you for your help.
  • 3
2 Solutions
vossjckAuthor Commented:
I realize I put the wrong string in the code.
That was from a different test.   I've tried the function with the path as "~/OrderDetail.aspx?OrderNumType=" + id

Still goes into the ECSMT folder as opposed to the root.
write the full path including the domain
vossjckAuthor Commented:
I found out the answer is to use "../".  This will bring you back to the root and you can actually test it on your local machine.  Putting the full path wouldn't allow me to do that.  
vossjckAuthor Commented:
The best solution is to use "../"  in the string.

Featured Post

Concerto's Cloud Advisory Services

Want to avoid the missteps to gaining all the benefits of the cloud? Learn more about the different assessment options from our Cloud Advisory team.

  • 3
Tackle projects and never again get stuck behind a technical roadblock.
Join Now