I met some trouble with my code,
In fact I would like to replace words abreviation by their expressions, but it does not work.
I have done the following code:
<script>
$('#suivi').keyup(function (e) {
var code = e.which ? e.which : e.keyCode;
var input = this.value;
console.log(input);
<?php
$rqt = "SELECT * FROM `glossaire` WHERE `id_company` ='".$societe['id']."'";
$result = mysql_query($rqt);
while ($data = mysql_fetch_assoc($result)) {
?>
if (input == "<?php echo ($data['libelle']) ; ?>") {
this.value = "<?php echo ($data['texte']) ; ?>"
};
<?php
}
?>
});
</script>
jquery 1.8 is set up on my page.
This script works fine on the following jsfiddle:
But not in my page. However it is the same.
I have no mistakes in the console of javascript.
Any kind of help will be much appreciated.
Kind regards.
SP.