troubleshooting Question

JavaScript for image hover not working in FIREFOX BROWSER

Avatar of mdkshah786
mdkshah786 asked on
2 Comments1 Solution412 ViewsLast Modified:
Hello Experts !

I'm working on an enhancement in my ASP.NET 4.0 web project.

Previously, I have a column present in GridView which holds the URL LINK of different images. When the user clicks this URL LINK he gets redirected to another page with the display of respective image.

Now, in the enhancement, when the user clicks the URL LINK, he must gets the display of page image at the center of the same page only.

I have written code which is working perfectly fine for IE & CHROME browser but its not at all working fine with FIREFOX browser.

Some Part of Code in ASPX Page :
<script type="text/javascript">
        // define reference to the hidden div element
        var div;
        // set reference to the div element after page is loaded
        function hover_show(src)
            div = document.getElementById('hoverbox');
             div.innerHTML = '<img src="' + src + '" width="80%" height="80%" scrolling="no" />';
   = 'visible';

        function hover_hide()
   = 'hidden';
In Code File :
if (e.Row.Cells[21].Text != "&nbsp;" && e.Row.Cells[21].Text != "0")
	//e.Row.Cells[21].Text = String.Format("<a href=" + e.Row.Cells[21].Text + " target='_blank'>View Image</a>"); //Image URL
	e.Row.Cells[21].Attributes.Add("onmouseover", "hover_show('" + e.Row.Cells[21].Text + "')");
	e.Row.Cells[21].Attributes.Add("onmouseout", "hover_hide()");
	e.Row.Cells[21].Text = String.Format("<a class='imgLink' href='#' name=" + e.Row.Cells[21].Text + " style='cursor:hand' >View Image</a>"); //Image URL

	e.Row.Cells[21].Text = "";
Please anyone help me on this !

Our community of experts have been thoroughly vetted for their expertise and industry experience.

Join our community to see this answer!
Unlock 1 Answer and 2 Comments.
Start Free Trial
Learn from the best

Network and collaborate with thousands of CTOs, CISOs, and IT Pros rooting for you and your success.

Andrew Hancock - VMware vExpert
See if this solution works for you by signing up for a 7 day free trial.
Unlock 1 Answer and 2 Comments.
Try for 7 days

”The time we save is the biggest benefit of E-E to our team. What could take multiple guys 2 hours or more each to find is accessed in around 15 minutes on Experts Exchange.

-Mike Kapnisakis, Warner Bros