Shamess ([info]shamess_the_elf) wrote in [info]javascript,
So, could anyone tell me why this isn't working?

I think the code is self explanatory, but for those that don't want to do the jump, I'm trying to understand the events object. I just need the mouse's current location (I know the problems with IE and Fx, I'll do that later, I just wanna make it work in Fx for now).

Thanks.

  • Post a new comment

    Error

    Your IP address will be recorded 

  • 2 comments

[info]promag

May 21 2008, 16:45:54 UTC 4 years ago

try this:

  var o = document.getElementById('judge-req-recorder');
  o.onmousedown = function(e){
    if (document.all)
    	alert(window.event.offsetX);
    else
    	alert(e.offsetX);
  }

window.event.offsetX - this for IE

offsetY - for y coordinate

[info]shamess_the_elf

May 24 2008, 12:27:21 UTC 4 years ago

Well, there are gonna be hundreds of judge types and stuff, so that'd just cause hundreds of lines, ne?
Create an Account
Forgot your login or password?
Facebook Twitter More login options
English • Español • Deutsch • Русский…