javascript - firefox js reference error event is not defined -


below js function working fine ie not working firefox.

function myfunction(sender, args) {             $(event.srcelement).trigger('rowselectionchanged', [sender, args]);     var hdnselectedrows = $(sender._element.parentelement).find('[id*=hdnselectedrows]');         if (hdnselectedrows.length > 0) {         selectedrows = args.getselectedrows();         if (selectedrows) {             if (selectedrows.get_length() > 0) {                 (var = 0; < selectedrows.get_length(); i++) {                     hdnselectedrows.val(args.getselectedrows().getitemid(i).index + ',');                 }                             }             else                 hdnselectedrows.val('');         }     } } 

i getting referenceerror event not defined

any highly appriciated.

thanks

in internet explorer, event defined global variable event.

in standard browser, event must passed event handler callback :

myelement.onclick = function(event){      iwrrc(sender, args, event); } function iwrrc(sender, args, event) {    ... function implementation } 

Comments

Popular posts from this blog

java.util.scanner - How to read and add only numbers to array from a text file -

rewrite - Trouble with Wordpress multiple custom querystrings -