Solved

Open dialog form from code behind in middle of sub

Posted on 2013-12-09
3
266 Views
Last Modified: 2014-03-04
I have a scenario where the user clicks a button. The code behind checks a few things and if  certain conditions exist, then I need to popup a box asking for a supervisor password. If the password is correct, the code should continue processing.

I am able to do this with a simple javascript prompt box but the problem is the password input really should be masked. So I thought I should create a custom dialog where I could control the input textbox. This custom dialog is simply another form.

I have tried a numerous versions of javascript to get this to work, but have failed in every attempt. Can anyone help me?

The button click event ideally would go like this:
If ..... then
     show dialog form
     if password = false then
           exit sub
    end if
Continue on with the code behind
0
Comment
Question by:Lisa412
3 Comments
 
LVL 17

Accepted Solution

by:
OmniUnlimited earned 500 total points
ID: 39707661
Have you checked out jQuery UI?  jQuery UI provides highly customizable dialog boxes that can be easily programmed to do just about anything you need it to do.  Check out the example of the masked password here (you'll need to click on the link that says "Modal form", then the button that says, "Create new user", then type something into the password field to see the example.)  You can add AJAX to the back end so that you can do database queries and verify passwords very easily.  If you like the idea of using this UI, I can give you some examples of how the AJAX interface would work.
0

Featured Post

Free Tool: Postgres Monitoring System

A PHP and Perl based system to collect and display usage statistics from PostgreSQL databases.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Suggested Solutions

Title # Comments Views Activity
Date on a table 16 33
Exchange Server 2013 Message Tracking log Powershell ? 11 78
Powershell Split 18 27
Add somewhat of a wildcard to your javascript 12 30
A publishing tool, a Version Control System, or a Collaboration Platform! These can be some of the defining words for the two very famous web-hosting Git repositories: Bitbucket and Github. Git is widely used amongst the programmers and developers f…
Real-time is more about the business, not the technology. In day-to-day life, to make real-time decisions like buying or investing, business needs the latest information(e.g. Gold Rate/Stock Rate). Unlike traditional days, you need not wait for a fe…
The viewer will learn how to count occurrences of each item in an array.
In a recent question (https://www.experts-exchange.com/questions/29004105/Run-AutoHotkey-script-directly-from-Notepad.html) here at Experts Exchange, a member asked how to run an AutoHotkey script (.AHK) directly from Notepad++ (aka NPP). This video…

685 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question