how to create a pop up window in JS that does user validation

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • rejoybhaskar
    New Member
    • Oct 2006
    • 14

    #1

    how to create a pop up window in JS that does user validation

    hi,

    how is it possible to make a pop up window that does the user validation for entering into the respective page. i mean when you open webmessenger.ya hoo.com

    you can see a similar example there. for logging in a pop up window comes up for entering the user name and password. if the user is validated the pop up closes and the control goes to the secure page on the main form.

    is it possible to add this pop up as a part of the main form so that the tab for the pop up is not shown in the window bar.

    and is it possible to implement this loggin in process through https protocol. as i dont know much about this.

    thanks in advance
  • hsriat
    Recognized Expert Top Contributor
    • Jan 2008
    • 1653

    #2
    Originally posted by rejoybhaskar
    hi,
    is it possible to add this pop up as a part of the main form so that the tab for the pop up is not shown in the window bar.
    to create a pop up as a part of main form,
    you may add this code to the HTML
    [HTML]<DIV ID="POPUP" STYLE="{DISPLAY :NONE;POSITION: ABSOLUTE;}">
    <FORM ACTION="XYZ" METHOD="POST">
    <INPUT ------ ID>
    <INPUT ------ PASSWORD>
    <INPUT ------ SUBMIT>
    </FORM>
    </DIV>[/HTML]
    any where in the page.

    then on the onclick even of the login button, add this js...
    Code:
    function openLogin() {
        	var d = document.getElementById('POPUP');
    	d.style.left = 100 + 'px';
    	d.style.top = 200 + 'px';
    	d.style.width = screen.availWidth - 200;
    	d.style.height = screen.availHeight - 550;
    	d.style.display = 'block';
    	d.style.zIndex=1000;
    }

    Comment

    Working...