Event Handlers

Results 1 to 2 of 2

Thread: Event Handlers

  1. #1
    Join Date
    Dec 1969

    Default Event Handlers

    Will it be possible to send arguments to the event handlers <BR>for ex.<BR>document.onkeyup=checkKeyValue(a1,a2) (Javascript code)<BR>If I pass like this,I am not able to reference the event handle<BR>Thanks.<BR>

  2. #2
    Bruno Santos Guest

    Default RE: Event Handlers

    hi, renu!<BR><BR>document.onkeyup=checkKeyValue(a1,a2) <BR><BR>no, this way you do run the function, and passes the returned value into the event handler property.<BR>you should pass the function address to this property for it to work:<BR><BR>document.onkeyup=checkKeyValue<BR><BR >after all, there are events which receive default and internal arguments, like the "onerror" one.&nbsp;&nbsp;what would be supposed to happen if you could pass values to it, nah?<BR><BR>Bruno (brunosantos@rj.net)

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts