Click here to Skip to main content
15,896,269 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
Hi everybody,
I want to a popup window by hyperlink click. Pupup window contain two textbox for username and password and a button. If username and password is incorrect then display
username or password not matching, on the popup window. If it is correct then redirect to another page.

I am new with javascript and jquery. Please help me.
Posted

1 solution

Ok this is pretty basic stuff but I am gonna try and give you some pointers rather than write the code for you. You have 2 ways of achieving this:

1) jquery UI: this is a total JavaScript based UI library that can help you create modal pop-ups. Have a look Here[^]

2) ASP.NET AJAX Control Toolkit: This is what I have used in the past and to some extent in the present as well. It has a control called ModalPopupExtender that displays a pop-up dialog, have a look Here[^]. You can build a panel containing the login controls as a separate user control and add that to the modal popup extender. You will then have to raise an event when the login is successful to redirect the user to the corresponding page but if the login is unsuccessful, keep the pop-up open and prompt the user for correct credentials.

However, I would not recommend using pop-ups because on mobile phones and smart phones pop-ups tend to be quite annoying. They tend to be a bit annoying even on desktops and hinder user experience. I would rather recommend using in-page login mechanism so the user interaction is consistent throughout. Unless, you can figure out a way to optimise pop-ups on a mobile phone.

Cheers.
 
Share this answer
 

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900