I have a simple Web Form with code like this:
//...
//tons of text
//...
<a name="message" />
//...
//tons of text
//...
<asp:Button ID="ButtonSend"
runat="server"
text="Send"
onclick="ButtonSend_Click" />
After POST I want to navigate user to my anchor "message". I have following code for this:
protected void ButtonSend_Click(object sender, EventArgs e)
{
this.ClientScript.RegisterStartupScript(this.GetType(),
"navigate",
"window.location.hash='#message';",
true);
}
This simple JavaScript is not working in Firefox 3.5.2 - url is changing in browser but page is not navigated to anchor. In IE 8 it works perfectly.
Why this JavaScript code is not working in Firefox? Am I missing something?