Forums

The forums ran from 2008-2020 and are now closed and viewable here as an archive.

Home Forums JavaScript onSubmit Validation is affecting multiple buttons – How to Stop?

  • This topic is empty.
Viewing 3 posts - 1 through 3 (of 3 total)
  • Author
    Posts
  • #33076
    jcoder
    Member

    Hi all,

    I have a form that onSubmit it validates the address. My problem is that it is also affecting my back button so when one hits back it tries to validate the form. Can I just have the back button go back without validating the form? Example below.



    <--Code taken out because of length-->






    #73464

    I remember running into this problem awhile back. It seemed the issue was that any input that was type=”image” was always treated as a submit button (or something similar).

    I’m not sure the code you have in place around it – but you could remove the input on the back button and style the href with css instead.

    #73412
    jcoder
    Member

    Thanks! That worked.

Viewing 3 posts - 1 through 3 (of 3 total)
  • The forum ‘JavaScript’ is closed to new topics and replies.