views:

62

answers:

1

Basically here is my code (Authenticator.jsp):

window.location.replace("Login.html"); // replace method also takes care of history
window.open ("Main.html", "Welcome logged in user");

Expected behaviour:

  1. We basically open the Main.html in a popup once a user has logged in.
  2. The current window must point to Login.html and main should open in a popup.

Actual behaviour:

  1. Main.html is opened in a popup
  2. Authenticator.jsp switches back to Login.html, BUT this Window gets focus !! and is shown in Front of my popup !!

Is there a solution for this ? This behaviour occurs in IE6 (I havent checked IE7 and IE8), it does not occur in Firefox and chrome

+1  A: 

I think you should call

window.location = "Login.html"

And then move the call to

window.open ("Main.html", "Welcome logged in user");

into the onload event of the Login.html page.

Neal Donnan
hmm,i dont think this is a possible solution, mainly because the login page should not open main page on load. its the responsibility of Authenticator,window.location works too, but it still focuses the login window in IE6
Salvin Francis