-6

I have a problem

My php file

<div id='1'><input type='text' onkeyup="comment('<?php echo $_SESSION["id"] ?>', e)"> 
</div>

My javascript file

function comment(id, e){alert(id); // WORK
alert(e.keyCode); //DOES NOT WORK}
user3064914
  • 921
  • 1
  • 7
  • 18
Abdou1221
  • 13
  • 3
  • 3
    why you are asking the same question again.Check the answers that you received earlier and if there is edits in the question then you should do it in that question not post same question again and again – Zword Jan 18 '14 at 13:22
  • http://jsfiddle.net/VA43k/ – ZiTAL Jan 18 '14 at 13:25

1 Answers1

0

Change your code to :

onkeyup="comment(event,'your string')"> 

function comment(e,id) {
  var comment = $(".blabla").val();
  // alert(message);  WORK
  alert(e.keyCode);
 }
Shhade Slman
  • 263
  • 2
  • 10