of all the things that drive me crazy...

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • DaMasta
    New Member
    • Mar 2009
    • 1

    of all the things that drive me crazy...

    hi..im new to the community and was finally so fustrated with guessing that i figured i'd try to get some help (and from my writing..you can probably tell im not exactly 40 years old)

    oki..here's my problem:

    i have recently been reorginizing the code in my website...messi ng with the css and javascript to give it more browser compatability

    somehow...in the middle of doing this for several days

    i disabled some code that had been previously been working

    ...onsubmit="ch eckLogged(usern ame.value,passw ord.value); return false;"...

    its very simple code which is what drives me most crazy

    checkLogged is a function that performs an ajax request to see if the username and password are correct(simply to save the hassle of making the user go to the next page only to find out their information was invalid)....

    if the function finds that the information is valid...it submits the page(...forms[0].submit...)..if not...it highlights the boxes in red to suggest the information is incorrect

    my problem is that it just keeps submitting and ignoring the "return false;"

    the reason i dont just do onsubmit=return checkLogged(... ) is because the ajax request doesnt have the true/false result fast enough

    btw..the solution has to work with both hitting the submit button or just hitting the enter key

    -nick
    plz help

    thx ahead of time
  • hsriat
    Recognized Expert Top Contributor
    • Jan 2008
    • 1653

    #2
    The problem seems to be pretty simple: some mistake in onreadystatecha nge or checkLogged. But you may need to paste some code to get help.

    Comment

    Working...