In javascript-segmentfault, how does one set an update reminder?

Source: Internet
Author: User
After you click the update button, the page is automatically refreshed. Then, the "Personal Data modified successfully" prompt appears at the top of the page, the source code is That ajax submits a post to apisetting, judges that the update is successful Based on the returned json, and then uses window. location. reload () refresh the page...

First look at the figure

After you click the update button, the page is automatically refreshed, and the "Personal Data modified successfully" prompt appears at the top of the page. The source code is That ajax submits a post/Api/settingThe update is successful Based on the returned json, and thenWindow. location. reload ()Refresh the page.

The problem is, how does one determine that I submitted the update before a refresh action?

Reply content:

First look at the figure

After you click the update button, the page is automatically refreshed, and the "Personal Data modified successfully" prompt appears at the top of the page. The source code is That ajax submits a post/Api/settingThe update is successful Based on the returned json, and thenWindow. location. reload ()Refresh the page.

The problem is, how does one determine that I submitted the update before a refresh action?

Store the prompt information in the session. The prompt message on the top is actually always present, but the content is displayed (commonly known as flash memory information)

Laravel4 http://v4.golaravel.com/docs/4.1/requests#old-input
Phalcon http://docs.phalconphp.com/zh/latest/reference/flash.html

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.