1

Why can the event object have no properties? I get this error in Mozilla Firefox while in IE and Opera all is well.

Please, follow this link to see the problem: here was the link

1 Answer 1

3

EDIT (now that a link is available): the problem is that you are attaching handleMove as the event handler which receives the event argument, then calling documentRelative and attempting to get the event object in there - but you never pass the event argument along.

Change lines 54 and 55 as follows:

function handleMove(e) {
    var documRelative = documentRelative(e);

or move

var e = (e) ? e : window.event;

from documentRelative to the start of handleMove and pass it into documentRelative.

Sign up to request clarification or add additional context in comments.

4 Comments

I added a link to the page with the script.
I changed (as you can see on the page) lines 54 and 55 but there's no affect.
You are also calling documentRelative from elementRelative; you'll have to pass the event object through there, too. I would suggest installing the Firebug extension and using its JS debugger to track these things down.
Thank you very much. It works now. Also, now I understand this whole pass-event thing.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.