Link to home
Start Free TrialLog in
Avatar of Rajar Ahmed
Rajar AhmedFlag for India

asked on

why this strange behaviour on ie6/7

Dear Experts,
 I used this particular css image roll over intentionally to avoid javascript imagechange and other css tricks as dis  provided the best & perfct situation on my application Untill i find this peculiar behavior on d ie6/7 brwser , whn i click d image button it causes postback after that  the mouseptr is still on the on d image and it displays hover image but it takes two clicks
for to cause postback when i move the mouse pointer and then bring back to the image  den it works properly . How to sort this issue?
Requirement:Image Change On Hover
Issue : IE $1X/$EVEN after postback , Improper behavior on hover of imagebutton  


waiting for ur valuable suggestion
Meeran03

<%@ Page Language="VB" AutoEventWireup="false" CodeFile="Default2.aspx.vb" Inherits="Default2" %>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> 
<html xmlns="http://www.w3.org/1999/xhtml"> 
<head> 
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" /> 
<style> 
.chan {
width: 16px;
height: 16px;
background-image: url(icon.gif);

}
 
.chan a {
color: #fff;
width: 16px;
height: 16px;
display: block;
text-decoration: none;
}
 
.chan a:hover {
background:inherit;
}
 
.chan a span {
display: none;
width: 16px;

}
 
.chan a:hover span {
display: block;
}
 
</style> 
</head> 
 
<body> 
<form id="form1" runat="server">
<div class="chan"><a  href="#"> 
<span> 
    <asp:ImageButton ID="ImageButton1" runat="server" ImageUrl="~/info-over.gif" />
</span> 
</a>
 </div> 
 </form>
</body> 
</html> 

CodeBehind
Imports System.Threading
Partial Class Default2
    Inherits System.Web.UI.Page
   
    Protected Sub ImageButton1_Click(ByVal sender As Object, ByVal e As System.Web.UI.ImageClickEventArgs) Handles ImageButton1.Click
        Thread.Sleep(5000)
    End Sub
End Class

Open in new window

Avatar of radcaesar
radcaesar
Flag of India image

Whats u want to do? Why are you using THREADS here?
Avatar of Rajar Ahmed

ASKER

dats just to show sum action on imagebutton click.
i want to do image change on hover .
ASKER CERTIFIED SOLUTION
Avatar of deegoy418
deegoy418
Flag of India image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
hi deegoy418,

  There r few reason why i followed my approach since
   ie6 got issues when we change the image on hover or using javascript it downloads d image each time from d server and make d progress bar work so badly .
They said it is d bug :
http://support.microsoft.com/kb/293373

As my example will overcome the problem faced by us but i dont know y on postback if we dint move d mouse, still on d same image and if we click d imagebutton  its not triggering postback

y it is ?

your Example dint worked on ie and also combined image is tds process now as all images  are kept seperately

Thank u For Response .

Hope to see some brighter side of this issue soon
:)Meeran