Note that there are some explanatory texts on larger screens.

plurals
  1. POClose current browser window or tab when popup opens
    text
    copied!<p>So, I've seen this approach on one site (I can't remember it, though) and it works like this: </p> <p>First, there is a simple page with a simple login form. But when you click the login button of the form, if the validation of user and password is positive and the response from the server is positive as well, a new pop-up window appears (which contains the application written in javascript - <a href="http://www.sencha.com/products/extjs/" rel="nofollow">ExtJS</a>) and the current tab of the browser (which was the login form page) closes.</p> <p>In my opinion, this is an excellent approach because the <code>ExtJS</code> is a single page application pattern, powerful enough to run full <code>AJAX</code>, without visible redirects. Plus, the pop-up scenario eliminates the browser page control buttons (back, forward, refresh) and the address bar is read-only.</p> <p>Now, I'm trying to reproduce this by using the help of ASP.NET as server side scripting language, among ExtJS as the main application. So, the results would be as following:</p> <ol> <li>Login page with a login form - HTML5 + CSS3</li> <li>Application page (pop-up window) - purely ExtJS</li> <li>A web service - <a href="http://servicestack.net/" rel="nofollow">ServiceStack</a></li> </ol> <p>The web service exposes the method for login purpose, as well as the other methods, and it always returns <code>JSON</code> responses. A session variable must be set (if the login was successful) before opening the pop-up and closing the window.</p> <p>And here comes the question:</p> <p><strong>How can I accomplish this scenario of opening a pop-up and closing the current window/tab if the login was successful?</strong> Any help, hints, references, advices, criticism is totally what I'm expecting.</p> <p>Thank you!</p>
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload