[ExtJS5 Study Notes] section 25th uses the window. open () function to redirect the ExtJS5 logon page. extjs5window. open

Source: Internet
Author: User

[ExtJS5 Study Notes] section 25th uses the window. open () function to redirect the ExtJS5 logon page. extjs5window. open

Address: http://blog.csdn.net/sushengmiyan/article/details/40427543

Mvvm method to achieve login blog: http://blog.csdn.net/sushengmiyan/article/details/38815923

Author: sushengmiyan

Certificate ------------------------------------------------------------------------------------------------------------------------------------

I wrote an article about the system logon instance in Extjs5MVVM mode. After writing this article, someone raised a question, that is, every time you click it, the login form will pop up, the login form interface is no longer available after login, and this article is generated due to that problem.

Method 1: Official Website --- login experience instance: http://docs.sencha.com/extjs/5.0/tutorials/login_app.html adds a login sign, according to login or not, display different interface

Method 2: Use window. open to redirect a webpage.

Step 1: Download The extjs5 http://download.csdn.net/detail/sushengmiyan/7701943

Step 2: Create index.html and app. js with the following content:

App. js

Ext.application({    name   : 'EnterSellSaves',    launch : function() {       Ext.create('Ext.Panel', {            renderTo     : Ext.getBody(),            width        : 200,            height       : 150,            bodyPadding  : 5,            title        : 'Hello World',            html         : 'Hello <b>World</b>...'        });    }});
Index.html

<! DOCTYPE html> 


On the login page, add a function to the login button.

Onclick = "login ()"

Function implementation:

<script type="text/javascript">  function login(){    window.opener = null;    window.open('','_self');window.close();window.open('index.html','11','location=0,resizable=no,fullscreen=true,titlebar=no,status=no,toolbar=no,menubar=no,left=0,top=0');  }</script>

In this way, the index and html

For logical judgment, you can change it to jsp and ASP.

In this method, you can use sencha cmd to generate the application framework, or manually introduce js files. It feels good.


Final result-Logon page

After login jump


After the page jumps, the URL is complete.



How to solve the problem of returning to the login interface after the EXTJS5 login and refreshing the page (the login program changed through the official example ticket-app of extjs5)






Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.