1

I can't get this to work. I'm ready to eat my keyboard, seriously. This "answer" seems to work for everyone but me, which leads me to believe that I'm a complete shmoe.

I need ALL error messages GONE. NOT THERE. ADIOS. IGNORED. All I want to do is stick a red border around the error input offender, which I've accomplished (with one exception, but I'll ask that after I have this thing answered/clarified)

Ok, now on to the code.

<script type="text/javascript">

$(document).ready(function(){
$("#pmpcontform").validate();
});

</script> 

Above works just fine, however when I try to add the magical line, below, to remove all errors messages, validation is no longer there. It will simple head on out the door to a confirmation page telling me how nice it was of me to fill out the form.

<script type="text/javascript">

$(document).ready(function(){
$('#pmpcontform').validate({
errorPlacement: function(error, element) {
return true;
});

</script>

I know. It's going to be some bracket I'm not seeing. Please tell me it's that.

Edit:

I see the 2 missing brakcets (it's the brakets, correct?) I have no idea where to close them. I've looked at 20 examples. The problem is I'm not familiar with JS. That, and I'm a Shmoe.

adg
  • 35
  • 1
  • 2
  • 8

1 Answers1

1

its some bracket you are not seeing ^_^ try this:

$(document).ready(function(){
   $('#pmpcontform').validate({
      errorPlacement: function(error, element) {
         return true;
      }
   });
});
Naftali
  • 144,921
  • 39
  • 244
  • 303
  • I kid you not. I counted them 18 times. Came up with an even number each time. I'm a Shmoe. And you're my hero of the week. If this works I'm coming to YOU for my next question (better log off) :) – adg Mar 29 '11 at 20:23
  • I love you. Did I mention that, too? – adg Mar 29 '11 at 20:24
  • Now. It works and doesn't garble up my layout anymore. I have a nice red border around the offending input field (css). But, after validation the cursor will go into the first offending field, which is fine, but the red border is gone and it defaults back to the black border. I don't know how to fix that. Should I post a new question? – adg Mar 29 '11 at 20:30
  • ok. but 1st accept an answer to this question (if the new question is unrelated) or update ur present question with an update – Naftali Mar 29 '11 at 20:32