jquery dialog's input fields freezes in firefox - javascript

I have some jquery dialogs added in my application where in one scenario I open up a 1st dialog and upon entries into some field I am prompted with a message containing some server side messages and that prompt is again a 2nd jquery dialog. that means i have 2 dialogs opened over each other. so when i click on the top most(2nd) dialog then both the dialogs' $('#div1').dialog('close') and $('#div2').dialog('close') are called I am redirected to another page. Now here is what the issue arises, I am on new page with both dialogs closed, now if I open up the 1st dialog again it opens up but with everything frozen. I mean it literally takes no input but a cursor keeps blinking in first field. This happens only in Firefox, in Chrome it works like a charm.

Related

Dialog box minimizes on clicking elsewhere in the main window

I'm using
dialog.showMessageBox([browserWindow, ]options[, callback])
to confirm a delete operation.I expect the user to close the dialog box first in order to perform some other operations.However, when the dialog box pops up the user is still able to click other parts of the window and on doing so the dialog box minimizes automatically.
Is there a way to restrict a user not to do anything else unless the dialog box is closed ?
Note: On Atom Editor do the following:
File -> Open File , this results in a dialog box for opening a file and while this dialog box is opened, the user is not able to click on anything on the main screen. This is the same behavior I'm looking at.
Check out this feature that was recently added: https://github.com/electron/electron/pull/6140

How to show Confirm Dialog Box always remains on top of any application?

I am doing one web application in PHP.
I am showing one JavaScript confirm dialog-box on window focus-out event but i want it to remains always on top of the screen and without responding to confirm dialog box user can not open any windows application or any other browser tab.
I am doing time calculation based on the confirm dialog box response.
Be more precise why you are trying to achive this and why. User can prevent javascript from executing in his browser, it is bad use it for these kind of security checks. User can also click on x button and not to confirm.

How can I allow scrolling of the background when the 'confirm' box pops up?

Using a Chrome extension in the browser, I allow the user to select a bunch of text to submit to the database. When the user hits enter, a confirm box pops up, but before the user hits 'OK' to submit, I want the user to be able to scroll in the background and double check everything that he's submitting. Is there anyway to make the background scroll while the confirm window is in focus?
You need to initialize the JQ dialog with modal set to false
Official doco on how it works is here: http://api.jqueryui.com/dialog/#option-modal
Provided that the text/fields/data to be submitted isn't huge, you should also consider jasonscript's idea of presenting the data in the popup. From what you're saying though, it's more important to show what they might have MISSED, not just what they included. Perhaps an on the fly screenshot of the webpage at the point they opened the submission form? That would show their selection clearly.

Block rest of the view except a particular element

Sorry for the title couldn't come with a better one...Okay here's is my doubt, when we display a javascript alert using alert("Some text") we see the alert dialog , Now the enter UI except the dialog box is unresponsive unless we hit Ok or close the alert window, Same goes for the confirm dialog. I am trying to build a widget to display my custom Confirm dialog using HTML elements but I don't know how to block the UI, The user if he wants can ignore the dialog & click other elements on the UI, Any suggestions or workarounds on blocking?
You could build a simple overlay with your dialog. Your dialog could be absolutely positioned on the screen, allowing users to either click it or other elments to the side of it.
http://www.emanueleferonato.com/2007/08/22/create-a-lightbox-effect-only-with-css-no-javascript-needed/

Javascript cookie to hide alert box

Ok I looked all over the internet but I just can't find what I want:
I have a page that sends a javascript alert to iPhone/android users only, and give them the option to go to the mobile website (if they click cancel another alert box shows up telling them how to acces the mobile site anyway).
But, this is very annoying if you go to that website everytime, and you everytime have to click cancel (this is only annoying to the people who click cancel all the time), so, can I get a cookie that remembers you clicked cancel and won't show the popup again for e.g. a month?
I don't want it to remember the choice (maybe users who clicked agree want to switch back but automatically get redirected again) but just not to show the confirm box anymore...
How can I do this?

Categories