Ajax Help

Discussion in 'JavaScript' started by priyakochin, Jul 6, 2008.

  1. #1
    Hi,
    I am very new to ajax.I just start studying it now.Here is a small script which I am editing in.

    http://galtech.org/seo/

    Here if u enter invalid email, and press send button error is displayed.

    But what I want is the error should be displayed even before pressing the send button.Just display error msg just after the cursor moves from email column to subject column.

    Plz help
     
    priyakochin, Jul 6, 2008 IP
  2. GreatMetro

    GreatMetro Peon

    Messages:
    117
    Likes Received:
    3
    Best Answers:
    0
    Trophy Points:
    0
    #2
    You need to put a function to check the email address in the head, and then call it with a "onblur" event from the email field:

    <span id="inputlabel">Email:</span> &nbsp;&nbsp;&nbsp;<input type="text" name="email" id="inputbox" onblur="EMAILCHECKFUNCTION()"><br /><div id="check"></div><br />

    replace EMAILCHECKFUNCTION() with your own function, obviously...
     
    GreatMetro, Jul 6, 2008 IP