Click here to Skip to main content
15,886,199 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
I have written my javascript in Master Page.
I have two aspx pages. One aspx page as main page, and another as popup window.
I am calling itthe popupwindow from Main page.
In javascript I am extending session when it timeout. It's working fine for Main page, but not working for popup window because of two instance of pages are open. On popup window it's calling javascript two times and override it's value. Does anybody have an idea about this?
Posted
Updated 1-Mar-12 9:37am
v2

1 solution

I think this may be sort of what you need: adapt as required:

JavaScript
// Used to track a popup window: only allows one version to open at a time.
var popup;

// The window attributes: this does not work correctly in IE6: who cares? :-)
var attr = "status=0,toolbar=0,menubar=0,directories=0,resizable=0,scrollbars=1";

// Opens a window.
function OpenWin(window) {
	if (!popup || popup.closed) {
		popup = window.open(window, '', attr);
	}

	popup.focus();
}
 
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