Javascript - Open Window question

Posted on 2011-10-13
Last Modified: 2012-05-12
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) 
  "/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.
Question by:vossjck
    LVL 2

    Author Comment

    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.
    LVL 15

    Accepted Solution

    write the full path including the domain
    LVL 2

    Assisted Solution

    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.  
    LVL 2

    Author Closing Comment

    The best solution is to use "../"  in the string.

    Featured Post

    6 Surprising Benefits of Threat Intelligence

    All sorts of threat intelligence is available on the web. Intelligence you can learn from, and use to anticipate and prepare for future attacks.

    Join & Write a Comment

    This article will give core knowledge of JavaScript and will head in to your first JavaScript program. I am Durvesh Naik and I am here to deal with this series of JavaScript. I will teach you JavaScript in part wise , as its quite boring to read big…
    International Data Corporation (IDC) prognosticates that before the current the year gets over disbursing on IT framework products to be sent in cloud environs will be $37.1B.
    The viewer will learn the basics of jQuery, including how to invoke it on a web page. Reference your jQuery libraries: (CODE) Include your new external js/jQuery file: (CODE) Write your first lines of code to setup your site for jQuery.: (CODE)
    The viewer will learn the basics of jQuery including how to code hide show and toggles. Reference your jQuery libraries: (CODE) Include your new external js/jQuery file: (CODE) Write your first lines of code to setup your site for jQuery…

    745 members asked questions and received personalized solutions in the past 7 days.

    Join the community of 500,000 technology professionals and ask your questions.

    Join & Ask a Question

    Need Help in Real-Time?

    Connect with top rated Experts

    16 Experts available now in Live!

    Get 1:1 Help Now