Hello and welcome to our community! Is this your first visit?
Register
Enjoy an ad free experience by logging in. Not a member yet? Register.
Results 1 to 4 of 4
  1. #1
    Regular Coder
    Join Date
    May 2006
    Posts
    152
    Thanks
    5
    Thanked 0 Times in 0 Posts

    Prevent Form Submission

    Hello there,

    I have a webpage with a text box for subscribing to a mailing list. I use JQuery and a few plugins to validate the email, and only submit it via AJAX if it's valid. The thing is, the form should never be submitted, but if the user presses enter after typing in their email.. the form is actually submitted its not parsed through the validation plugin and sent via AJAX.. how do I fix this?

    http://northvillebasketball.com/girls/

    I've tried using onsubmit.. but it does not work.

    Thanks in advance!

  • #2
    Kor
    Kor is offline
    Red Devil Mod Kor's Avatar
    Join Date
    Apr 2003
    Location
    Bucharest, ROMANIA
    Posts
    8,478
    Thanks
    58
    Thanked 379 Times in 375 Posts
    debugging JQuery (or any other framework) is an impossible mission, as they use hundreds of silly custom methods and objects. Should you have used a native, plain javascript codes, we could have helped you. Otherwise, you should hope for somebody from the JQuery crew to observe your post and give you a clue.

    Using frameworks instead of learning and creating your own javascript code lines will always bring troubles.
    KOR
    Offshore programming
    -*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*

  • #3
    Senior Coder A1ien51's Avatar
    Join Date
    Jun 2002
    Location
    Between DC and Baltimore In a Cave
    Posts
    2,717
    Thanks
    1
    Thanked 94 Times in 88 Posts
    Wow, someone has a bad personal opinion on a JavaScript library.

    Code appears to be working now, guessing you fixed it?

    Eric
    Tech Author [Ajax In Action, JavaScript: Visual Blueprint]

  • #4
    Regular Coder
    Join Date
    Jul 2006
    Posts
    399
    Thanks
    33
    Thanked 7 Times in 7 Posts
    100 or more lines of code for a email address validation??? lol


  •  

    Posting Permissions

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