Firefox throws 'event not defined ' while running the code

kayatsclest

New Member
Code:\[code\]$(document).ready(function() { $("#main_div").bind('click', function(e){ var x = event.pageX-document.getElementById("main_div").scrollLeft; var y = event.pageY-document.getElementById("main_div").scrollTop; document.pointform.form_x.value = http://stackoverflow.com/questions/12814065/x; document.pointform.form_y.value = y; var a= x-404; var b= y-88; if(document.getElementById('optionselect').valuehttp://stackoverflow.com/questions/12814065/=='a') { $("#container-5").css({"top":b,"left":a}); $("#container-5").show(); e.stopPropagation(); } else if(...) { ... } }); });\[/code\]Hey Guys, the code is working fine in IE and Chrome but when i try to run the same in firefox it throws an error 'event is not defined' and points the cursor where var x is defined. How do i overcome this problem?
 
Back
Top