dcsimg
Need to refresh window instead of opening a new window.
5 posts in topic
Flat View  Flat View
TOPIC ACTIONS:
 

Posted By:   Shveti_Shah
Posted On:   Wednesday, October 24, 2001 12:07 PM

I am doing paging using jsp and am calling a javascript functions to open the window and passing 3 parameters. How can I refresh the same window without opening up a new window while passing the parameters? The code is:

function paginate(page,from,to)
{
tpage = window.open("pager.jsp"?p="+page+"&f="+from+"&t="+to,"",height=500,width=900,menubar=yes,toolbar=yes,re
sizable=yes,scrollbars=yes);
}

Re: Need to refresh window instead of opening a new window.

Posted By:   Firat_Tiryaki  
Posted On:   Thursday, October 25, 2001 02:14 AM

sorry but I forgot something. You can give the random number like below.



today = new Date();

num = today.getTime();

num = Math.round(Math.abs(Math.sin(num) * 1000000));

windowName.location="yourURL?random="+num;

Re: Need to refresh window instead of opening a new window.

Posted By:   Firat_Tiryaki  
Posted On:   Thursday, October 25, 2001 02:10 AM

In this kind of situation you can send a random number to the url (GET method)


url?random=17343453 refreshes the page.

Re: Need to refresh window instead of opening a new window.

Posted By:   Firat_Tiryaki  
Posted On:   Thursday, October 25, 2001 02:07 AM

You can use windowName.history.go(0) too...

Re: Need to refresh window instead of opening a new window.

Posted By:   Firat_Tiryaki  
Posted On:   Thursday, October 25, 2001 02:06 AM

windowName.location.reload() works fine...

Re: Need to refresh window instead of opening a new window.

Posted By:   Nitesh_Naveen  
Posted On:   Wednesday, October 24, 2001 05:18 PM

rewrite the function as:

function paginate(page,from,to)
{
self.location="pager.jsp"?p="+page+"&f="+from+"&t="+to;
}
About | Sitemap | Contact