troubleshooting Question

How to persist javascript dialog box

Avatar of bassman592
bassman592Flag for United States of America asked on
11 Comments1 Solution73 ViewsLast Modified:
I am not very comfortable with javascript, but I am working with a web site where I would like to make a small change, if I can figure out how to do it.

There is a page where users can view some codes associated with clients. On this page, users can - among other things - add new codes. There is an "Add/Edit" button that, when pressed,  allows the user to add new codes. When the "Add/Edit" button is pressed, a dialog box pops up containing various controls that allow the user to configure and add a code. The issue I am trying to change is that, when this dialog box has been displayed, if the user for some reason clicks outside the dialog box, it immediately closes losing any configuration information the user may have entered. If they still want to add a code, they click the "Add/Edit" button again and start over. I want to change it so that the dialog box does NOT close if the user clicks outside the dialog box, but only closes when the user presses either the "Cancel" or the "Save" button. Also, the dialog box should retain any information the user has already entered.

I have attached screenshots of the main form (screen1) and the dialog box (screen2).

I don't need exact code for this particular application, I just need some representative code to see how this could be done in javascript. I know in Windows, there are various modes that can be specified when displaying a window, so maybe it is as simple as that. But maybe not.
Join our community to see this answer!
Unlock 1 Answer and 11 Comments.
Start Free Trial
Learn from the best

Network and collaborate with thousands of CTOs, CISOs, and IT Pros rooting for you and your success.

Andrew Hancock - VMware vExpert
See if this solution works for you by signing up for a 7 day free trial.
Unlock 1 Answer and 11 Comments.
Try for 7 days

”The time we save is the biggest benefit of E-E to our team. What could take multiple guys 2 hours or more each to find is accessed in around 15 minutes on Experts Exchange.

-Mike Kapnisakis, Warner Bros