Jump to content

Gingerclaire_

Members
  • Posts

    5
  • Joined

  • Last visited

Posts posted by Gingerclaire_

  1. Does anyone know how to change the css and text on the form to indicate an error instead of the pop up message? We've been told to use this file:

    <script type="text/javascript" scr="http://ajax.googleapis.com/ajax/libs/jquery/1.9.1/jquery.min.js"></script>

    but I've really no idea where to start!?

  2. Thanks guys! I've check it again and it is now validating. Just not for the name though (I can still submit it without a name).

    <script type="text/javascript">function validateForm() {    if (false === validate_required(    document.forms["myForm"]["name"], "Name must be supplied")) {        return false;    }    if (false === validate_required(    document.forms["myForm"]["email"], "Valid email must be supplied")) {        return false;    }    return true;}function validate_required(field, alerttxt) {    if (field.value === null || field.value == "") {        alert(alerttxt);        return false;    } else {        return true;    }}      </script>     <script type="text/javascript" src="http://ajax.googleapis.com/ajax/libs/jquery/1.9.1/jquery.min.js"></script><script>$("document").ready(function () {    $("form").validate();});</script>
×
×
  • Create New...