简体   繁体   中英

Login to ajax loading of home page

I am trying to create a dynamic login screen where my whole 'logged in' page isnt loaded into the dom until the form validates where the login screen scrolls down into the homepage without 'actually' scrolling.

I was thinking of doing this by

form -> ajax -> validate -> on validate ajax load expanding div under login area and load home page with ajax -> jquery hide login area.

Is there any easier way? if I already have both pages combined currently to just hide that part of the dom?

In general, I'd propose to give XAJAX a try.

The XAJAX library integrates well with PHP and eg allows to update several DOM elements at once.

In general, I'd prefer to run the login-operation in a non-AJAX fashion. But that's more or less a matter of taste. Once the user is logged in, I'd switch to AJAX.

Moreover, I wouldn't just hide the logged-in DOM element.

May be this could help you: Login y logout con PHP, MySQL, JQuery y Ajax (Spanish) http://bit.ly/tBmHtV

It have worked for me.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM