admin管理员组文章数量:1289868
- There is a password protected page.
- There is a link in the single page, clicking on it opens the "Popup Maker" modal window.
- Content from the password-protected page from point 1 is loaded into this modal window.
- If the password was not entered or entered incorrectly in the modal window there is a form for entering the password, if the password is entered correctly, we see the necessary content.
Everything works correctly, except for one thing, after the user entered the correct password, the page reloads and this is where everything ends. To see the content, you need to click on the link from point 2 again. This is very inconvenient.
Please tell me how to make the modal window open again immediately after entering the password and reloading the page, as well as at any time by clicking on the link from paragraph 2?
- There is a password protected page.
- There is a link in the single page, clicking on it opens the "Popup Maker" modal window.
- Content from the password-protected page from point 1 is loaded into this modal window.
- If the password was not entered or entered incorrectly in the modal window there is a form for entering the password, if the password is entered correctly, we see the necessary content.
Everything works correctly, except for one thing, after the user entered the correct password, the page reloads and this is where everything ends. To see the content, you need to click on the link from point 2 again. This is very inconvenient.
Please tell me how to make the modal window open again immediately after entering the password and reloading the page, as well as at any time by clicking on the link from paragraph 2?
Share Improve this question asked Jun 30, 2021 at 8:24 VladSiyVladSiy 57 bronze badges1 Answer
Reset to default 0I solved the problem in this way. Maybe someone will need it.
- Configured the modal window so that a cookie is created when the window is closed.
- Launched a modal window until the user closes the window and a cookie is created.
Here is the code:
...
if ( ! isset( $_COOKIE["pum-909"] ) ) { ?>
<script>
setTimeout(function() {
PUM.open('909'); // This is my popup class "popmake-909"
}, 1000);
</script>
<?php }
...
版权声明:本文标题:php - How do I reopen the (Popup Maker) after entering the correct password for a password protected page? 内容由网友自发贡献,该文观点仅代表作者本人, 转载请联系作者并注明出处:http://www.betaflare.com/web/1741474185a2380782.html, 本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如发现本站有涉嫌抄袭侵权/违法违规的内容,一经查实,本站将立刻删除。
发表评论