Hello and welcome to our community! Is this your first visit?
Register
Enjoy an ad free experience by logging in. Not a member yet? Register.
Results 1 to 3 of 3
  1. #1
    New to the CF scene
    Join Date
    Dec 2002
    Posts
    2
    Thanks
    0
    Thanked 0 Times in 0 Posts

    .htaccess w/ javascript - the next step

    Hi,

    Two questions:

    1) In order to get rid of the popup boxes that result from protecting an area on a site with .htaccess, I have created a form in HTML that uses javascript to pass the user variables. I have also created a 401 access denied page.

    Everything works beautifully if you enter the correct password.

    The problem is this:
    If you enter the wrong password that darn popup box appears again asking you to enter your password again. If I enter the wrong password enough times in the popup box it will eventually bring me to the 401 screen I made.

    But how do I get it to either skip the popup box and go directly to the 401, or give me another chance to enter my password on the HTML page, so you never get that popup box.

    finally
    2) How do I bring focus to the login button on my original form so you can just hit enter after typing in the password instead of manually having to move the mouse to click the button.

    thanks in advance

  • #2
    Senior Coder joh6nn's Avatar
    Join Date
    Jun 2002
    Location
    72 W. 48' 57" , 41 N. 32' 04"
    Posts
    1,887
    Thanks
    0
    Thanked 1 Time in 1 Post
    i think this is the kind of thing that's better done with a server side language. if you want, i'll move this thread there, unless someone has some really nifty JS for this.
    bluemood | devedge | devmo | MS Dev Library | WebMonkey | the Guide

    i am a loser geek, crazy with an evil streak,
    yes i do believe there is a violent thing inside of me.

  • #3
    New to the CF scene
    Join Date
    Dec 2002
    Posts
    2
    Thanks
    0
    Thanked 0 Times in 0 Posts
    sure, if you think it is better posted in the server side lanuguage forum then please move.

    thanks

    PS - also figured out a work around for the second problem on bringing focus to the button. used javascript to track the "enter" button keystroke instead of passing focus.


  •  

    Posting Permissions

    • You may not post new threads
    • You may not post replies
    • You may not post attachments
    • You may not edit your posts
    •