Solved

Open dialog form from code behind in middle of sub

Posted on 2013-12-09
3
269 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
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
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

Get 15 Days FREE Full-Featured Trial

Benefit from a mission critical IT monitoring with Monitis Premium or get it FREE for your entry level monitoring needs.
-Over 200,000 users
-More than 300,000 websites monitored
-Used in 197 countries
-Recommended by 98% of users

Question has a verified solution.

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

Today, the web development industry is booming, and many people consider it to be their vocation. The question you may be asking yourself is – how do I become a web developer?
The Windows functions GetTickCount and timeGetTime retrieve the number of milliseconds since the system was started. However, the value is stored in a DWORD, which means that it wraps around to zero every 49.7 days. This article shows how to solve t…
This tutorial will teach you the core code needed to finalize the addition of a watermark to your image. The viewer will use a small PHP class to learn and create a watermark.
Use Wufoo, an online form creation tool, to make powerful forms. Learn how to choose which pages of your form are visible to your users based on their inputs. The page rules feature provides you with an opportunity to create if:then statements for y…

617 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