views:

45

answers:

2

Hi all I am using the following javascript code to refresh another page

window.opener.location.replace(url)

The problem is when entering the url, do not find the page as the page is located in the root and this calling code is placed in a page inside another folder. How do I specify the path to point to the root, which is where the page is located? I have try many things, but it does not work; //page.aspx, ../page.aspx, ~/page.aspx, page.aspx, /page.aspx....

Many thanks in advanced

A: 

This form should work:

window.opener.location = url;

The replace method replaces a match in the current URL with another string, but it won't work with just one parameter. At any rate, it is not necessary to specify the full URL, you can only specify the partial path such as:

../page.htm
Dario Solera
A: 

You would have to give exact path

Ravia