SitePoint Sponsor

User Tag List

Results 1 to 4 of 4
  1. #1
    SitePoint Enthusiast Star777Star's Avatar
    Join Date
    Apr 2010
    Location
    South Africa
    Posts
    27
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Check Form Script

    hey there

    I have a form with a text field and a submit button. I don't want the form to submit if the text field is filled in correctly. for example a email address typed in the text field area. I'm working with spry validation but i guess i need to add some kind of onSubmit event, with javascript.

    I have some idea but not sure what to fill in by the "if statements" in the script.

  2. #2
    SitePoint Enthusiast
    Join Date
    Sep 2006
    Posts
    26
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    ArticleQueen: First Article Rewriter with Lexical Processor!

  3. #3
    SitePoint Wizard siteguru's Avatar
    Join Date
    Oct 2002
    Location
    Scotland
    Posts
    3,631
    Mentioned
    2 Post(s)
    Tagged
    0 Thread(s)
    http://www5.brinkster.com/hiflyer/js...mchecktest.htm

    Code:
    <form ...stuff... onsubmit="return formchecker(this)">
    If the function returns false then the form submit is cancelled. (ONLY if the client browser is set to run JavaScript code!)

    Ian Anderson
    www.siteguru.co.uk

  4. #4
    SitePoint Enthusiast Star777Star's Avatar
    Join Date
    Apr 2010
    Location
    South Africa
    Posts
    27
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    wow, cool that helped. Thank you so much!

    and thanx for the article vnviews ^_^


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
  •