View Full Version : event.clientx doesn't work in firefox

12-28-2010, 04:15 AM
hi -- someone wrote a script for me to simulate an image map on a background header in wordpress. it works great in chrome and ie, but not firefox. can someone pls. help? thx.

<script type="text/javascript">
function geturl() {
if(myMouseX < 400) {
return "http://www.alexandrazissu.com/az-blog/books/";
else {
return "http://www.alexandrazissu.com/az-blog/";

and then the call:

<div id="header-image" onclick="location.href = geturl();" style="cursor: pointer;">

12-28-2010, 12:09 PM
I don’t see any reason why firefox should populate the event variable inside the function. for inline JavaScript you have to explicitly pass the event variable (same as the this variable).