anchor IE 6 bug
-
22-08-2019 - |
Question
I created an anchor like this:
<a id="create" />
and it works in IE 7 but not in IE 6.
How do I fix it in IE6?
Further Info:
I am using asp.net c#. I am running it in IE6 and in an iframe. The screen just refreshes and the panel doesn't show. But if I don't use:
Response.Redirect(Request.Url.PathAndQuery + "&New=1#create");
i.e. If I do:
Response.Redirect(Request.Url.PathAndQuery + "&New=1");
It works fine, but doesn't goto the panel. btw: it all works fine under IE 7. It doesnt work in IE 6 or in IE 6 in an iframe
Solution
IE 6 has a strange behaviour, it does not recognizes redirects with anchors in it. The workaround is to add additional ampersand symbol '&' before the '#'. So, in your example, the code will look like Response.Redirect(Request.Url.PathAndQuery + "&New=1&#create");
I suggest you to check User-Agent on the server side and add this additional ampersand if the browser is IE 6.
OTHER TIPS
from memory you use the 'name' attribute
try to use name='create'