Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Anchor element not working in firefox and chrome

I have a hyperlink on an image on my client site. It's working in IE but when I open the same page in Chrome/Mozilla it's not showing the anchor pointer and nothing happens on clicking either. My code:

<a href="Home.aspx?ModuleID=1">
 <img alt="Alternative Text" src="Images/Logo.gif" />
</a>

Does somebody have any idea what the issue could be?

like image 426
surenv2003 Avatar asked Feb 03 '11 09:02

surenv2003


1 Answers

Simple Work around: This works in all browsers I have tested so far use document.getElementById([anchor tag]).scrollToView(true);

Example: --from--

<a href="#" onclick="document.getElementById('ShowMeHow2').scrollIntoView(true);return false;">

--to--

<a id="ShowMeHow2" name="ShowMeHow2"> </a>
like image 54
Jim Rider Avatar answered Oct 30 '22 20:10

Jim Rider