PHP control front-end dialog box, php front-end dialog box

Source: Internet
Author: User

PHP control front-end dialog box, php front-end dialog box

Application scenarios:

This requirement is derived from user confirmation during authorized logon;

The reason why the corresponding logic is not placed on the frontend is that this part of the logic is partial to functional services, so it is placed on the backend for convenient unified management.

 

Solution:

Use php echo to generate a javascript script. here we need to pay attention to the buffer zone.

The buffer zone should have three parts: php, webserver, and web browser, which can be output in real time through program code or configuration files. The background is relatively controllable, however, there are different browser buffer mechanisms at the front-end, so I have not studied them in depth. My solution is to allow non-real-time output.

 

One requirement to allow non-real-time output is that after the pop-up window is processed, no program jump is required. As follows:

<? Php echo "<script> if (confirm ('select the response page, which means yes.html does not apply to HTML? ') Location.href0000'yes.html'; else location.href0000'no.html '; </script> "; // The following hearder Section cannot be added. // Header ('location: http://www.baidu.com ');?>

 

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.