Opening the same pop up window it it's closed - javascript

For a reason, I have to use pop up window instead of modal window. I want the user do everything with the menu I provide inside the pop up window. Unfortunately, I can't disable the default close button (in the right top corner of the pop up window) and I don't want my user to use it.
After I googled it, I found it's impossible to make it disable, but in a forum (I forget the link) I found someone gave a trick to handle it: open the same pop up window when it's closed with that button. He didn't give sample code for it. How to do it? I don't know how to give function in that default close button. Please help.

Related

Ekko lightbox closes popup on escape button push

I cannot find the way lightbox popup window is closed when user pushes escape button.
No such event handler in lightbox.js file.
Somebody can explain the way lightbox closes the popup?
I absolutely forgot that ekko ligthbox is connected to bootstrap, so the behavior was going from bootstrap.js.
Line #1062 if somebody has the same question as mine.

how we can restrict user to click or go on the browser window until they close the opened pop up window?

I am making a web application which takes the exam related programming languages, and i am opening a pop up window for test when a user click to start a test ,
but i want to restrict them to go on the main broweser window until they submit the exam(pope up window closed automatically) or they will close manualy
As far as i know its not possible with javascript. but cant you better use a box that will lay on top of the original page content like you can do with Jquery.
http://jqueryui.com/dialog/#modal-form
Removing the buttons and other forms of cancelation and only leave a post button when all answers are given.

What is the difference between a modal window and a dialogue window?

The question describes exactly what i want to know . What is the difference between a modal window and a dialogue. When a modal window becomes a dialogue and vice versa ? How do i go about achieving both ? A nudge in the right direction will be very much appreciated .
A modal window is a windows that runs on top of an application, so that you can't do anything at all with the applciation until you have closed the modal window.
A jQuery dialog is not a separate window, so technically it can't be a modal window. It can however emulate most of what a modal window does, by putting an overlay element over the rest of the page so that you can't interact with it.
A modal window will not let you continue until you close it.
There are two main categories of temporary windows in IxD:
Modless and Modal
Modless: that dont require users to exit out to access the behind layers - like tooltip, select, popover (non-sticky), menu etc. These dont have the overlay and you can see all the behind layers as-is.
Modals: that require users to take an action before they can access the behind layers - like dialog (a,k,a alert dialog), slide-in-panel, bottom-sheet (new in mobile), popover (skicky). These are mostly required to have the overlay to afford that this is not letting you access the behind layer till you get rid of this.
Visually -- shadows should be reserved for these two in the UI

Javascript reload page after popup submit Coldfusion

I have a popup window where my user can edit information displayed on the parent page. When someone press submit changes on the popup window i need the popup to close and also the parent page to reload to display the new information.
I know there are a lot of examples out there but the questions displayed here did not provide me with enough information to complete my task.
I am currently using onClick="history.go(0)" which take me back to the parent page but does not reload the page
The question was a bit vague (not really a question at all, even), but you can try window.location.href="/parentpage";
To close the pop up window from within the pop up window use this:
self.close();
To RELOAD the window that opened the pop up use this in the pop up window:
window.opener.href = 'URL';
This should be pretty close to what you need.

I need to keep the modal from being closed by the user

Any Ideas?
I tried inserting ....({ .....,...., close:false,....}) and nothing.
Thanks in advance.
PS: I will close the modal window when satisfied with $.modal.close();
If you call a modal window as you have indicated {close:false}, the following will happen:
The closeHTML will not be displayed
The user cannot click the overlay to close the dialog
The user cannot press ESC to close the dialog
If you have a button/link in your code with the simplemodal-close class, the user will still be able to press that to close the dialog.
So, based on the information you have provided, if you are using {close:false}, the only other way possible for a user to close the dialog is if you have provided a way for them to. As such, you need to hide, disable, or remove the simplemodal-close class until you are ready for them to close the dialog.

Categories

Resources