views:

33

answers:

0

hi! I got this kind of form validation:

php side:

  if ( trim($message)=="" )
  {
    echo "lalalaal<br>lalalalala";
  }

then in the onsuccess ajax jquery:

var error=$('div#error_contact').html()
switch(error){

  case "lalalaal<br>lalalalala":
    $("#form_contact").slideUp()
  }

if i put a <br> the string equality is not verified so de $("#form_contact") wont slide up, why the ajax transport doesnt recognize <br> ?