Solved

Open dialog form from code behind in middle of sub

Posted on 2013-12-09
3
256 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

What Security Threats Are You Missing?

Enhance your security with threat intelligence from the web. Get trending threat insights on hackers, exploits, and suspicious IP addresses delivered to your inbox with our free Cyber Daily.

Join & Write a Comment

New Relic: Our company recently started researching several products to figure out what were the best ways for us to increase our web page speed and to quickly identify performance problems that we may be having. One of the products we evaluated wa…
This article will show, step by step, how to integrate R code into a R Sweave document
The viewer will learn how to dynamically set the form action using jQuery.
Wufoo.com provides powerful tools for surveying targeted groups, and utilizing data from completed surveys to find trends, discover areas of demand or customer expectation, and make business decisions on products or services.

708 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

Need Help in Real-Time?

Connect with top rated Experts

13 Experts available now in Live!

Get 1:1 Help Now