I have an asp.net application and I need to have two sessions running at once.
I also use windows.open on some of my pages, and this is where my problem starts. If I have two sessions running when I call windows.open in JavaScript from one of my pages in session two, the new window opens with the session id from session one.
I should also add that the second session is created in a different IE instance using the code below.
var myshell = new ActiveXObject("Shell.Application");
if (parseFloat(ieVersion) >= 8) {
myshell.ShellExecute("iexplore.exe", "-noframemerging " + url, "", "open", 1);
}
else {
myshell.ShellExecute("iexplore.exe", url, "", "open", 1);
}
I have know idea why this is but I found the problem…
The new window opened from the second instance of IE was not loading correctly and was rendering back on the first instance of IE.
The javascript to open the window is simply:
window.open(the_url, “DisplayWindow”, option);
This works on the first instance of IE just fine, and on some computers running Windows 7 and IE 9 it works opening a window on the second instance of IE, but for other computers running the same set up this just dosnt work!
The solution is simply to remove the window name.
window.open(the_url, “”, option);
I also found a similar issue where in IE9 the window will not open if the window name contains a space! So try changing the window name or removing it if you have a similar problem.