Solved

ImageButton Not Firing In Chrome

Posted on 2013-01-11
5
573 Views
Last Modified: 2013-01-12
ImageButtons (VS2010) work fine in IE but do not call code-behind when using Chrome.
0
Comment
Question by:cehrnow
  • 3
5 Comments
 
LVL 35

Expert Comment

by:Miguel Oz
ID: 38769212
Check:
http://stackoverflow.com/questions/6703822/image-button-click-event-not-firing-in-chrome
You may need to do the css rules suggested in the link.

Note: If it does not work please post your image button markup and the rendered HTML from Chrome.
0
 

Author Comment

by:cehrnow
ID: 38769623
onMouseOver and onMouseOut work okay but onClick does not fire.

<img src="List.gif" id="cmdMenu" style="left:22;width:56;height:26px;position:absolute;top:15px;Visibility:visible;cursor:hand;" width="96" border="0" alt="List" onClick="cmdSelect()" onMouseOver="cmdMouseOver()" onMouseOut="cmdMouseOut()" />
0
 

Author Comment

by:cehrnow
ID: 38769629
<img id="cmdMenu" style="left: 22px; cursor: hand; position: absolute;
top: 15px" height="26" alt="List" src="List.gif" width="56" runat="server" />
0
 
LVL 38

Accepted Solution

by:
Tom Beck earned 500 total points
ID: 38769954
It must have something to do with what you are doing in the mouseover and mouseout events because the click event fires in Chrome in this test.
<img src="List.gif" id="cmdMenu" style="left:22px;width:56px;height:26px;position:absolute;top:15px;visibility:visible;cursor:hand;" border="0" alt="List" onClick="cmdSelect()" onMouseOver="cmdMouseOver(this)" onMouseOut="cmdMouseOut(this)" />
<script type="text/javascript">
function cmdSelect() {
	alert("cmdSelect()");
}
function cmdMouseOver(ele) {
	ele.src = "List_over.gif";
}
function cmdMouseOut(ele) {
	ele.src = "List.gif";
}
</script>

Open in new window

0
 

Author Closing Comment

by:cehrnow
ID: 38769956
You were right...in the event being called itself.
0

Featured Post

Free Tool: ZipGrep

ZipGrep is a utility that can list and search zip (.war, .ear, .jar, etc) archives for text patterns, without the need to extract the archive's contents.

One of a set of tools we're offering as a way to say thank you for being a part of the community.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

I recently went through the process of creating a Calendar Control of events with the basis of using a database to keep track of the dates that are selectable, one requirement was to have the selected date pop-up in a simple lightbox.  At first this…
The article shows the basic steps of integrating an HTML theme template into an ASP.NET MVC project
This video shows how to quickly and easily add an email signature for all users on Exchange 2016. The resulting signature is applied on a server level by Exchange Online. The email signature template has been downloaded from: www.mail-signatures…
A short tutorial showing how to set up an email signature in Outlook on the Web (previously known as OWA). For free email signatures designs, visit https://www.mail-signatures.com/articles/signature-templates/?sts=6651 If you want to manage em…

829 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question