Go Premium for a chance to win a PS4. Enter to Win

x
?
Solved

Open dialog form from code behind in middle of sub

Posted on 2013-12-09
3
Medium Priority
?
278 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
1 Comment
 
LVL 17

Accepted Solution

by:
OmniUnlimited earned 2000 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

Concerto Cloud for Software Providers & ISVs

Can Concerto Cloud Services help you focus on evolving your application offerings, while delivering the best cloud experience to your customers? From DevOps to revenue models and customer support, the answer is yes!

Learn how Concerto can help you.

Question has a verified solution.

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

These days, all we hear about hacktivists took down so and so websites and retrieved thousands of user’s data. One of the techniques to get unauthorized access to database is by performing SQL injection. This article is quite lengthy which gives bas…
A while back, I ran into a situation where I was trying to use the calculated columns feature in SharePoint 2013 to do some simple math using values in two lists. Between certain data types not being accessible, and also with trying to make a one to…
The viewer will learn how to dynamically set the form action using jQuery.
In this seventh video of the Xpdf series, we discuss and demonstrate the PDFfonts utility, which lists all the fonts used in a PDF file. It does this via a command line interface, making it suitable for use in programs, scripts, batch files — any pl…
Suggested Courses

824 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