473,386 Members | 1,830 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,386 software developers and data experts.

Firefox problems with <img> tags

Hi there,

This code is working fine in IE7 as submit button for the search form, but not in Firefox. Any ideas why.

Expand|Select|Wrap|Line Numbers
  1. <img src="../../Images/Go.jpg" width="45" height="20" align="absmiddle" style="Cursor:Hand;" onClick="funcSearchUsers();"> 
Thanks.
May 2 '07 #1
6 5306
I fogot to mention what is the error!!!

It does not recognize it as button or clickable.

Thanks.

Terry
May 2 '07 #2
drhowarddrfine
7,435 Expert 4TB
There is no cursor:hand. Change it to pointer and see if it works with that.
May 2 '07 #3
pronerd
392 Expert 256MB
It does not recognize it as button or clickable.
That is because it is not a button. Is it possible that another layer in the page is sitting on top of the image preventing it from being clicked on? Does it work if you remove the style and align attributes? Neither of the values being used look like they are supported.
May 6 '07 #4
I tried removing the styles but that did not help. Any other ideas.

Thanks for the reply
May 12 '07 #5
pbmods
5,821 Expert 4TB
As general nitpickery, it s/b "onclick" instead of "onClick", and your img tag should be closed with a "/>" insead of ">". I doubt these will solve the problem, but it will make the W3 Validator like your site better :)

Does Firefox give you an error when you click on the image, or does nothing happen? Is the function supposed to do something every time you invoke it, or are there situations where it might return without doing anything visible? Have you put an alert at the head of funcSearchUsers to verify that it is being invoked properly?

Your tag looks fine. I wonder if the problem is in the context. Post some relevant code around your tag.
May 12 '07 #6
gits
5,390 Expert Mod 4TB
hi ...

does it really dont work? i tried it on a firefox 2.0.0.3 and it works ... onclick fires and the function will be called ... there are the following things to mention:

- the image doesn't look like clickable ... its a pure img but you may (and you have) attach(ed) an event-handler ... click on the image calls the function ...
- in safari that is also recognized and you get the hand as cursor when moving the mousepointer over the image ...

- so the best way to give the user feedback that this image is clickable is ... a rollover ... switch the image-source on mouseover and show another image ... so the user recognize that there is something clickable and performs the action ... perhaps you find another style that shows another mousepointer in case of firefox ... but i personally would prefer the rollover-solution
May 12 '07 #7

Sign in to post your reply or Sign up for a free account.

Similar topics

2
by: Mike Ritter | last post by:
Hi, I know it could maybe be done with preg_match_all but I dont have any Idea how to do that. Anyone knows how can I extract all URLs inside the IMG Tags? (<img src="???">) Thanks a lot,...
15
by: Philipp Lenssen | last post by:
My friend has the following problem (background: we want to transform XML to XHTML via XSLT): "We copy XHTML fragments into an output by using the following template: <xsl:template match="*"...
1
by: Michael | last post by:
In HTML, I would like the base tag... <base href="http://myserver/dir1/"> ....to affect an embedded image src property with a relative path.. <img src="dir2/myimage.jgp"> ....such that the...
9
by: Wladimir Borsov | last post by:
As well known for <IMG ...> tags in web pages a width and a height attribute can be applied. What I want to do now is to fix the width for ALL the images on my web page to exactly lets say 70 pixel...
2
by: ThePsudo | last post by:
# SIMPLE VERSION # Is there a way I can create a new <img> tag onClick? # DETAILED VERSON # I'm making a game that involves drawing a path between two points on a grid. I've got the...
3
by: Henry Johnson | last post by:
Okay - I'm spinning my wheels on this one... can someone help me figure out how to programmatically populate a table cell as follows (from C# code-behind)? I've tried using a Literal control in the...
1
by: Carl | last post by:
Hi all I have a javascript function that drags and drops an element (ie img) into a container (ie bordered div). The function works and returns the element and and container. My next step is to...
4
by: SammyBar | last post by:
Hi all, I wonder is it possible to upload the content of an <imgfield to a server. The content of the <imgwas downloaded from a web site different from the one it should be uploaded. The image...
4
by: Jon Slaughter | last post by:
I have a captcha system going and for some reason when I use <?php $s = ""; for($i = 0; $i < 10; $i++) { $s = $s.rand(0,9); } $_SESSION = $s; $fn = '/Login/Register/Captcha.php'; echo '<img...
0
by: taylorcarr | last post by:
A Canon printer is a smart device known for being advanced, efficient, and reliable. It is designed for home, office, and hybrid workspace use and can also be used for a variety of purposes. However,...
0
by: aa123db | last post by:
Variable and constants Use var or let for variables and const fror constants. Var foo ='bar'; Let foo ='bar';const baz ='bar'; Functions function $name$ ($parameters$) { } ...
0
by: ryjfgjl | last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.