Problem with validation of a field

Collapse
This topic is closed.
X
X
 
  • Time
  • Show
Clear All
new posts
  • Bilal

    Problem with validation of a field

    Hi,
    I have a field that requires validation when you press a button as
    follows:
    <form name="form_affi che" enctype = "multipart/form-data"
    method="get">
    .....
    <td width="80"><inp ut type="Button" name="submitBut ton"
    value="Modifier " tabindex="3" onClick="if(isV alid())
    {document.form_ affiche.action= 'order.php';doc ument.form_affi che.submit();}r eturn
    false;"></td>
    .....
    </form>
    The validation works perfectly when the button is pressed. However,
    should the user enter an invalid number and press ENTER as opposed to
    the button "Modifier", then the invalid number is taken into
    consideration.

    Thank you in advance for any suggestion or solution.
    Kind regards
    Bilal
  • Phil Roberts

    #2
    Re: Problem with validation of a field

    With total disregard for any kind of safety measures
    bjeewa@hotmail. com (Bilal) leapt forth and uttered:
    [color=blue]
    > Hi,
    > I have a field that requires validation when you press a button
    > as follows:
    > <form name="form_affi che" enctype = "multipart/form-data"
    > method="get">
    > ....
    > <td width="80"><inp ut type="Button" name="submitBut ton"
    > value="Modifier " tabindex="3" onClick="if(isV alid())
    > {document.form_ affiche.action= 'order.php';doc ument.form_affi che.s
    > ubmit();}return false;"></td>
    > ....
    > </form>
    > The validation works perfectly when the button is pressed.
    > However, should the user enter an invalid number and press ENTER
    > as opposed to the button "Modifier", then the invalid number is
    > taken into consideration.
    >
    > Thank you in advance for any suggestion or solution.
    > Kind regards
    > Bilal
    >[/color]

    You should really be asking this in a Javascript group.

    --
    There is no signature.....

    Comment

    Working...