Click here to Skip to main content
15,891,316 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
hi,

i want to retain javascript variable value of win object (var win=window.open())
after page refresh.
Is there any way to maintain win variable after refresh?
pls hlp.
Thanks.
Posted
Comments
Sandeep Mewara 23-Jun-12 9:59am    
If you elaborate more about your scenario needed then we might suggest possible ways to handle it.
Manisha Tambade 25-Jun-12 1:23am    
thanks Sandeep,

my scenario in detail is like:

I have login page,Main page on which different linkbuttons are present on clicking those linkbuttons
again new window opens using window.open() and can view data.

Case1:
And on one linkbutton i open 1 page on that page i have option manage data button, on clicking that i opens a new page for adding data and then closes it and i redirects it to pervious page at the same time i refreshes this pervious page so that added data i can see in pervious page in the form of new link..
This is my functionality.

Case2:
now I have logout link on Main page's right corner.
when i clicks on it i want to close main page and all opened windows and redirecting to login page.
so that i maintained 1 array on main page for Win objects.
so i can achieve caase 2 that is of logout button functionality.

Now the thing is that when i refreshes data in case 1 , my array of case 2 becomes resets to null and i cant do functionality of case2 and vice-versa.

1 solution

I can see two ways@

- close the popup when the original page is unloaded, and re-open it again after the page has loaded.
- in the popup you could set a timer and call a script in the original window after it finishes its refresh.
 
Share this answer
 

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900