waqasahmed
waqasahmed

Reputation: 3845

anchor IE 6 bug

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

Upvotes: 2

Views: 1522

Answers (3)

Artem Koshelev
Artem Koshelev

Reputation: 10604

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.

Upvotes: 4

x4tje
x4tje

Reputation: 1643

try to use name='create'

Upvotes: 1

SpliFF
SpliFF

Reputation: 39014

from memory you use the 'name' attribute

Upvotes: 2

Related Questions