YAFLogo

johnk
  • johnk
  • 74.8% (Friendly)
  • YAF All-the-Time Topic Starter
9 years ago
When creating a new post, click on preview button.

Actual Result: Pages does post back and browser slider is at/near the bottom of the page.

Expected Result: Browser slider should go to the top of the page (since that is where the preview is)

We can use this psuedo code when Preview button is clicked:


StringBuilder cstext1 = new StringBuilder();
        cstext1.Append("<script type=text/javascript>$("div.header").scrollTop(0) </");
        cstext1.Append("script>");

Page.ClientScript.RegisterStartupScript(this.GetType(), "ScrollUp", cstext1.ToString());

Sponsor