SitePoint Sponsor

User Tag List

Results 1 to 4 of 4
  1. #1
    ::==:: Bonzo_CS's Avatar
    Join Date
    Dec 2003
    Location
    (Cardiff Wales)
    Posts
    747
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    disable a button on submit.

    Hi All,

    I have a form which contains 2 image buttons. One is a zip code search another the submit.

    If the user presses enter anywhere within the form it triggers the zip code popup which has an onclick alert within it.

    How can I stop this from happening so if the user presses submit anywhere other than the zip code area it will just submit and not pop up the zip code box.

    Cheers

  2. #2
    I'll take mine raw silver trophy MikeFoster's Avatar
    Join Date
    Dec 2002
    Location
    Alabama, USA
    Posts
    2,560
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    INPUT elements of type 'image' become SUBMIT buttons. So you have two SUBMIT buttons. A simple solution is to let the zip code button be something like this:

    <img src='' onclick=''>

  3. #3
    ::==:: Bonzo_CS's Avatar
    Join Date
    Dec 2003
    Location
    (Cardiff Wales)
    Posts
    747
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Cheers MikeFoster that explains it. I changed the type and solved the issue.

    Thanks

  4. #4
    I'll take mine raw silver trophy MikeFoster's Avatar
    Join Date
    Dec 2002
    Location
    Alabama, USA
    Posts
    2,560
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)


Bookmarks

Posting Permissions

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