473,605 Members | 2,691 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

Firefox problems with <img> tags

3 New Member
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();"> 
May 2 '07 #1
6 5319
3 New Member
I fogot to mention what is the error!!!

It does not recognize it as button or clickable.


May 2 '07 #2
7,435 Recognized Expert Expert
There is no cursor:hand. Change it to pointer and see if it works with that.
May 2 '07 #3
392 Recognized Expert Contributor
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
3 New Member
I tried removing the styles but that did not help. Any other ideas.

Thanks for the reply
May 12 '07 #5
5,821 Recognized Expert Expert
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
5,390 Recognized Expert Moderator Expert
hi ...

does it really dont work? i tried it on a firefox 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

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, Mike.
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="*" mode="xhtml"> <xsl:element name="{local-name()}"> <xsl:copy-of select="@*"/> <xsl:apply-templates mode="xhtml"/> </xsl:element>
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 image would be fetched from... "http://myserver/dir1/dir2/myimage.jpg" Why doesn't the base tag work for this? Is there another tag that does?
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 regardless how big the originals are. The height should be adjusted proportional so that the resulting thumbnail is not distorted. But as far as I know there is no such attribute like <IMG SRC=...... WIDTH=70 HEIGHT="Adjust proportional to...
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 pathfinding routine working fine, but drawing it out on a grid is proving difficult. Since I can't just draw a line segment, I made a set of graphics to use: a bit of horizontal line, vertical line, and two diagonals. I just take a few copies of each and
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 TableCell, a HyperLink control, and an Image, but I'm not getting the results I want. Here's the source of what I'm after (retrieved by viewing the source of a page I'm trying to emulate): <td><a...
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 center the element in the container if the user is sloppy with positioning it. I can only test this on IE6 and IE5.5 and it fails. It positions the element too much right and low. Here is the function: function SnapToContainer(Container,El) {
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 file should not be saved locally before uploading. It should not be visible any <input type=file on the form. How can it be done? I'm working on a project where client javascript requests an image server to generate dynamic images. The client...
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 src="'.$fn.'" alt="Captcha" />'; ?>
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, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main usage, and What is the difference between ONU and Router. Let’s take a closer look ! Part I. Meaning of...
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, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed. This is as boiled down as I can make it. Here is my compilation command: g++-12 -std=c++20 -Wnarrowing bit_field.cpp Here is the code in...
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that captivates audiences and drives business growth. The Art of Business Website Design Your website is...
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then launch it, all on its own.... Now, this would greatly impact the work of software developers. The idea...
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules. He will explain when you may want to use classes instead of User Defined Types (UDT). For example, to manage the data in unbound forms. Adolph will...
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and then checking html paragraph one by one. At the time of converting from word file to html my equations which are in the word document file was convert into image. Globals.ThisAddIn.Application.ActiveDocument.Select();...
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated we have to send another system
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating effective websites that not only look great but also perform exceptionally well. In this comprehensive...

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.