Window pop up lock Main window

Asked

Viewed 30 times

0

Hello, I am developing a system in PHP but using some things in javascript on the front... the truth is that I still do not know much of javascript, so I wanted to know the following:

The situation is: I have a registration system that works on the home page. But there are links to generate new entries or edit them that open in a pop up window to perform the POST method. Everything is working perfectly, but if the user minimizes the pop up window, it will be hidden in the taskbar and will not appear even if he clicks again. This would cause less experienced users to be lost, in addition to taking more time...

What I wanted to know is if there is a way to block this pop up on the screen, forcing it to stay on the main page, without being able to be minimized... I did not find anything in this regard, so I do not know if it is possible. But I think a second alternative, which would already suit me well, would be when clicking on the link that generates the pop up, if it is minimized, it appears again in front of the user... But I don’t know how to do it ^^'

Code I’m using to generate the pop up:

function MM_openBrWindow(theUrl, winName, features) {
window.open(theUrl, winName, 'resizable=no, fullscreen=no, scrollbars=no, width=880, height=560, location=no, menubar=no, copyhistory=no, directories=no, status=no, toolbar=no');
}
<a href="javascript:void(0)" onClick="MM_openBrWindow('nova_encomenda.php','Nova_Encomenda','')">

  • What you need is a modal window, which occupies the page until it is closed. You can create a "at hand" or use some framework that has it ready, like jquery, or bootstrap

  • I think this answers your question https://www.guj.com.br/t/janela-pop-up-para-impedirnavegacao/170539

No answers

Browser other questions tagged

You are not signed in. Login or sign up in order to post.