www.webdeveloper.com
Results 1 to 2 of 2

Thread: simple password check

  1. #1
    Join Date
    Nov 2002
    Posts
    11

    simple password check

    I'm trying to create a very simple password checker, but can't get it to work. If the user enters an incorrect password, which is checked against the correct password retrieved from the database using ASP, I want a Javascript alert box to pop-up saying something like 'incorrect password, try again'.

    I've tried various combinations of ASP and Javascript but it either does nothing at all or the alert box appears when the page first loads, before any password has been entered.

    This is my latest unsuccessful attempt.

    <%
    '..code to get entered and actual passwords

    if entered_password=actual_password then
    Response.Redirect "gotonextpage.html"
    else
    response.write "<script language='javascript'>" & vbCrLF
    response.write "<!--" & vbCrLF
    response.write "alert('Incorrect password. Try again');" & vbCrLF
    response.write "-->" & vbCrLF
    response.write "</script>" & vbCrLF
    end if
    %>

    Any help would be appreciated.

    Thanks
    Rob

  2. #2
    Join Date
    Nov 2002
    Posts
    11

    simple password checker

    Thanks Dave, that did it.

    Rob

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Posting Permissions

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



Recent Articles