I m trying to check if the contain of my input text contains a substring whih is a variable : here s my code :
<script>
$("#envoi_search").click(function () {
var contenu = $("#champ").val() ;
$("#envoi_search").click(function() {
$("#result").html( ) ;
$( #envoi_search ).attr("disabled", "disabled");
$.ajax({
type: "POST",
url: "http://www.edumobile.org/blog/uploads/XML-parsing-data/Data.xml",
data: "{}",
cache: false,
dataType: "xml",
success: function(data) {
$(data).find("Book").each(function () {
var temp = $(this).find("name").text() ;
if (temp.toLowerCase().contenu > -1) {
$("#result").append("<br> Titre : " + temp);
$("#result").append("<br> Auteur : " + $(this).find("address").text());
$("#result").append("<br> Pays : " + $(this).find("country").text());
$( #envoi_search ).attr("disabled", "");
}
});
}
});
});
});
</script>
And I don t know why it doesn t work. Do you have Any idea about my problem ? Thanks :)