Results 1 to 3 of 3

Thread: Validation

  1. #1
    Join Date
    Nov 2013


    How could I show a validation error for a text field of a form even before pressing submit button, using ajax ?
    As shown below.

  2. #2
    Join Date
    May 2006
    Somewhere behind your screen
    if you post some code somebody would help you i believe
    Last edited by Padonak; 11-11-2013 at 09:13 AM.
    signature under construction

  3. #3
    Join Date
    Mar 2007
    You wouldn't use AJAX directly as you are not sending data anywhere.

    You would use JavaScript to test an input field, using the HTML tag elements onblur to trigger an event when the user moves away from that text input to then call a function that checks the input, the use of onfocus to set the onblur event up can also allow you to ensure that the field is empty or to place any data generated by the page in to that field.

    The advice so far has been to ask you to post some code that you have created already and when you do, remember the forum tags to wrap the code, these are buttons available in the advanced editor and also in the quick reply window but you can just as easily use them directly, Eg...

    [ HTML ] ... code here [ /HTML ] (without the spaces) same applies to CODE and PHP tags. If you mess up, you have a short window of time to edit your post.
    --> JavaScript Frameworks like JQuery, Angular, Node <--
    ... and please remember to wrap code with forum BBCode tags:-

    [CODE]...[/CODE] [HTML]...[/HTML] [PHP]...[/PHP]

    If you can't think outside the box, you will be trapped forever with no escape...

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Posting Permissions

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