onMouseDown doesn't work in firefox?...

igowerf

Diamond Member
Jun 27, 2000
7,697
1
76
I'm getting a ton of "jg is not defined" errors in the JS console in FF.

Have you tried just setting onMouseDown="alert('onmousedown!')"? This will at least tell if you the onMouseDown event is working, which it should.

I usually just put alerts everywhere so I can see how far my script is able to execute. Put another one at the top of your pressSelect function to see if the function is ever even called.
 

Atheus

Diamond Member
Jun 7, 2005
7,313
2
0
OK, I cleaned it up a bit, you won't get those errors anymore.

I also simplified the js, it's just alerts now, and it's all inline. Both the top two buttons work in IE, but only the the second one works in FF... the only difference between them is that #1 is onMouseDown while #2 is onClick...

I'm pulling my hair out here.
 

igowerf

Diamond Member
Jun 27, 2000
7,697
1
76
I just realized that you're putting the onMouse events on the img tag. Try doing this:

<a onMouseDown="alert("hi")"><img src="bla"></a>
 

notfred

Lifer
Feb 12, 2001
38,241
4
0
use "onmousedown" and "onclick" not "onMouseDown" and "onClick". They're not capitalized.
 

Atheus

Diamond Member
Jun 7, 2005
7,313
2
0
Thanks guys, but I made both changes to the code, and there's no change in behaviour. I should be able to figure this out myself, It's such a simple thing :roll:
 

igowerf

Diamond Member
Jun 27, 2000
7,697
1
76
You also seem to be missing a lot of closing tags. For example, I don't see a closing /table tag after those buttons. None of the rows are properly closed with a /tr tag. Instead, you have lots of extra tr tags. Clean that stuff up first. Your doctype is set to HTML 4.01 Transitional but your code has tons of warnings. I've found that I can get really weird behavior when I have stuff like that in my code.