Welcome to WebmasterWorld Guest from

Forum Moderators: open

Message Too Old, No Replies

<img> as button does not work in FF

11:10 pm on May 2, 2007 (gmt 0)

New User

10+ Year Member

joined:May 2, 2007
votes: 0

I am trying to use this code which works fine in IE7 but not in FF. Any ideas on why? The problem is does not recognize it as a button.

<img src="../../Images/Go.jpg" width="45" height="20" align="absmiddle" style="Cursor:Hand;" onClick="funcSearchUsers();">



11:35 pm on May 2, 2007 (gmt 0)

Full Member

10+ Year Member

joined:Nov 3, 2003
votes: 0

I think what you want is:

<input type="image"...

6:53 pm on May 4, 2007 (gmt 0)

Senior Member

WebmasterWorld Senior Member 10+ Year Member

joined:Mar 18, 2007
votes: 0

Dude... Why don't you just make a link with an image in it, or a sized block-level link with a background image, or as someone already said, an input with image type (which I've never used, personally).

As a link, just make the src="javascript:funcSearchUsers();"

And the attributes you put in your img tag (especially stuff like align) can be done with CSS styles.

And are you sure FF didn't recognize it as a button? Maybe javascript was disabled, or maybe you didn't even try clicking, just stopped when you saw that the cursor didn't change to a hand... "Hand" Isn't a valid cursor to choose from... I don't know where you got it from, or why it works with IE (IE is garbage by the way). The cursor you want to use is "pointer".
Like I said though, that in itself wouldn't make it not work if you clicked it though... I'm just guessing you didn't click it because the cursor didn't even change. Either that, or you did click it, but javascript was disabled.

[edited by: Xapti at 7:03 pm (utc) on May 4, 2007]


Join The Conversation

Moderators and Top Contributors

Hot Threads This Week

Featured Threads

Free SEO Tools

Hire Expert Members