Php,js,ajax What kind of technology can be used to change foreground data in the background

Source: Internet
Author: User
Php,js,ajax which technology can change foreground data in the background?
Cases:
Front page login.php:
A login form, account and password Plus submit button
At this time, fill in the Account password click button, how to let the page into the waiting state? And then
How can the background admin.php, view the form of the user submitted by this foreground, and then send a message to the page that the user is visiting? or change the code or data or links on his current page?


------to solve the idea----------------------
Background change front desk is basically not feasible, although said now have websocket this new protocol of full duplex. Your need for this is basically AJAX-enabled.

The basic logic is to click the Submit button, with the JS control to display the waiting page, when the server has a return value, cancel the display of the waiting page, in accordance with the return value with JS to modify the current page display.
------to solve the idea----------------------
This demand sounds weird, but I know you must be Ajax.
------to solve the idea----------------------
My general practice is: Do not use form submission. The Submit button is tied to a point-and-click event via JavaScript, and the handler for the event pops up a wait box (a div that loads the animation and obscures the entire page), sending post data (user name, password) to PHP via Ajax and binding the callback function. When PHP finishes processing the results back to the page, the callback function that is bound by Ajax hides the wait box and changes the display of the page based on the results returned by PHP (or jumps to other pages or prompts for errors, etc.).
------to solve the idea----------------------
Ajax technology can solve the landlord problem.
  • 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.