/    Sign up×
Community /Pin to ProfileBookmark

td+onclick = Problems in firefox

Hi,
In my webpage i have created a table where the cells consists of images. The user can see the image coordinates on clicking within the individual cells. I used <td onclick = “func(event)”> to invoke the necessary javascript function where event.offsetX and event.offsetY gets displayed. This works fine on my IE6 web browser but not on firefox. Any idea why? I found out that using td onclick is not cross browser friendly. If its true is there a better way to determine the image coordinates within <td>?
Hope someone can help. Thanks a lot!

to post a comment
HTML

1 Comments(s)

Copy linkTweet thisAlerts:
@FangApr 14.2009 — Shouldn't be a problem unless another event is fired on an underlying layer.

If you use an input type image, the form action gives the coordinates of the pointer.
×

Success!

Help @koolz33 spread the word by sharing this article on Twitter...

Tweet This
Sign in
Forgot password?
Sign in with TwitchSign in with GithubCreate Account
about: ({
version: 0.1.9 BETA 5.11,
whats_new: community page,
up_next: more Davinci•003 tasks,
coming_soon: events calendar,
social: @webDeveloperHQ
});

legal: ({
terms: of use,
privacy: policy
});
changelog: (
version: 0.1.9,
notes: added community page

version: 0.1.8,
notes: added Davinci•003

version: 0.1.7,
notes: upvote answers to bounties

version: 0.1.6,
notes: article editor refresh
)...
recent_tips: (
tipper: @AriseFacilitySolutions09,
tipped: article
amount: 1000 SATS,

tipper: @Yussuf4331,
tipped: article
amount: 1000 SATS,

tipper: @darkwebsites540,
tipped: article
amount: 10 SATS,
)...