Jump to content

Jquery not working


sphinx

Recommended Posts

Hello,

 

For some reason, this jquery is not operating:

 

<script src="http://ajax.microsoft.com/ajax/jquery/jquery-1.3.2.min.js" type="text/javascript"></script>
<script src="http://ajax.microsoft.com/ajax/jquery.validate/1.5.5/jquery.validate.js" type=”text/javascript”></script>

<script type="text/javascript"> 
$("#CustomerForm").validate({

       errorLabelContainer: $("#RegisterErrors"),

      rules: {

                FirstNameEdit: { required: true },

                LastNameEdit: { required: true },

               EmailEdit: { required: true, email: true }

           },

            messages: {

               FirstNameEdit: "First name is required",

               LastNameEdit: "Last name is required",

              EmailEdit: "Valid email address is required"

          }

       });
</script>


<form id="CustomerForm">

   <p>

    <label for="FirstNameEdit">First Name:</label>

    <input id="FirstNameEdit" type="text" class=”required” />

    </p>

    <p>

    <label for="LastNameEdit">Last Name:</label>

    <input id="LastNameEdit" type="text" class=”required” />

    </p>

   <p>

  <label for="EmailEdit">Email:</label>

   <input id="EmailEdit" type="text" class=”required email” />

   </p>

   <p>

   <button type="submit">Submit</button>

   </p>

   </form>
   <div id="RegisterErrors" style="display:none">

 

Many thanks

Link to comment
https://forums.phpfreaks.com/topic/251798-jquery-not-working/
Share on other sites

first step here would be to check your jquery source paths to make sure that they are linking correctly.

Then you will want to debug your javascript using either an online resource like jslint.com or firefox's plugin "firebug".

If you still cannot find the error here, feel free to write back on here and we will take a further look.

Link to comment
https://forums.phpfreaks.com/topic/251798-jquery-not-working/#findComment-1291198
Share on other sites

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.