Help: javascript incompatible with firefox

Discussion in 'HTML & Website Design' started by vitaminp, Dec 6, 2006.

  1. #1
    yet another cross-browser problem, and im not too good with javascript.

    take this:
    http://xoog.net/index.php?a=v&m=p&memid=3&iid=7043

    When a user clicks on a picture, it should send them to a page with with the image co-ordinates they have clicked on (To create an 'imagetag' like 'vitaminp' on the bottom right).

    It works fine in IE and Opera, but Firefox isn't interested.

    The image tag has this: onClick='tagMe(this)'

    which executes:
    function tagMe(obj){ 
    clickX = window.event.offsetX; 
    clickY = window.event.offsetY; 
    
    window.location="http://xoog.net/index.php?a=addTag&x="+clickX+"&y="+clickY+"&m=p&iid=7043";
    
    } 
    Code (markup):
    ... how to I make that cross-browser compatible? Thanks :D
     
    vitaminp, Dec 6, 2006 IP