{"action":"created","issue":{"url":"https://api.github.com/repos/alvarotrigo/fullPage.js/issues/1494","labels_url":"https://api.github.com/repos/alvarotrigo/fullPage.js/issues/1494/labels{/name}","comments_url":"https://api.github.com/repos/alvarotrigo/fullPage.js/issues/1494/comments","events_url":"https://api.github.com/repos/alvarotrigo/fullPage.js/issues/1494/events","html_url":"https://github.com/alvarotrigo/fullPage.js/issues/1494","id":105532246,"number":1494,"title":"Postback jumps to first anchor","user":{"login":"rickyg91","id":10337776,"avatar_url":"https://avatars.githubusercontent.com/u/10337776?v=3","gravatar_id":"","url":"https://api.github.com/users/rickyg91","html_url":"https://github.com/rickyg91","followers_url":"https://api.github.com/users/rickyg91/followers","following_url":"https://api.github.com/users/rickyg91/following{/other_user}","gists_url":"https://api.github.com/users/rickyg91/gists{/gist_id}","starred_url":"https://api.github.com/users/rickyg91/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/rickyg91/subscriptions","organizations_url":"https://api.github.com/users/rickyg91/orgs","repos_url":"https://api.github.com/users/rickyg91/repos","events_url":"https://api.github.com/users/rickyg91/events{/privacy}","received_events_url":"https://api.github.com/users/rickyg91/received_events","type":"User","site_admin":false},"labels":[{"url":"https://api.github.com/repos/alvarotrigo/fullPage.js/labels/question","name":"question","color":"cc317c"}],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":4,"created_at":"2015-09-09T06:54:42Z","updated_at":"2015-09-09T09:22:29Z","closed_at":null,"body":"Hi, when ever a postback is triggered on any of my controls the page refreshes and jumps to the first anchor. I am not changing the # anywhere and I have had to use the below work-around:\r\n Page.ClientScript.RegisterStartupScript(this.GetType(), \"anchor\", \"location.hash = '#secondPage';\", true);\r\n\r\nThis is my HTML:\r\n<%@ Page Language=\"C#\" AutoEventWireup=\"true\" CodeFile=\"mainpage.aspx.cs\" Inherits=\"mainpage\" MaintainScrollPositionOnPostback=\"true\" %>\r\n\r\n<%@ Register Src=\"~/Controls/Menu.ascx\" TagName=\"Menu\" TagPrefix=\"mnu\" %>\r\n<%@ Register Src=\"~/Controls/Header.ascx\" TagName=\"Header\" TagPrefix=\"hdr\" %>\r\n<%@ Register Src=\"~/Controls/profile.ascx\" TagName=\"Profile\" TagPrefix=\"prf\" %>\r\n<%@ Register Src=\"~/Controls/settings.ascx\" TagName=\"Settings\" TagPrefix=\"set\" %>\r\n<%@ Register Src=\"~/Controls/home.ascx\" TagName=\"Home\" TagPrefix=\"hme\" %>\r\n<%@ Register Src=\"~/Controls/help.ascx\" TagName=\"Help\" TagPrefix=\"help\" %>\r\n<%@ Register Src=\"~/Controls/friends.ascx\" TagName=\"Friends\" TagPrefix=\"frd\" %>\r\n<%@ Register Src=\"~/Controls/wishes.ascx\" TagName=\"Wishes\" TagPrefix=\"wsh\" %>\r\n<%@ Register Src=\"~/Controls/events.ascx\" TagName=\"Events\" TagPrefix=\"evn\" %>\r\n\r\n<!DOCTYPE html>\r\n\r\n<html xmlns=\"http://www.w3.org/1999/xhtml\">\r\n    <head runat=\"server\">\r\n        <title></title>\r\n\r\n        <link href=\"Styles/Styles.css\" rel=\"stylesheet\" type=\"text/css\" />\r\n        <link href=\"Styles/jquery.fullPage.css\" rel=\"stylesheet\" type=\"text/css\" />\r\n        <link href=\"Styles/examples.css\" rel=\"stylesheet\" type=\"text/css\" />\r\n\r\n        <!--[if IE]>\r\n\t\t    <script type=\"text/javascript\">\r\n\t\t\t     var console = { log: function() {} };\r\n\t\t    </script>\r\n\t    <![endif]-->\r\n\r\n\t    <script src=\"http://ajax.googleapis.com/ajax/libs/jquery/1.8.3/jquery.min.js\"></script>\r\n\t    <script src=\"http://ajax.googleapis.com/ajax/libs/jqueryui/1.9.1/jquery-ui.min.js\"></script>\r\n        <script type=\"text/javascript\" src=\"Scripts/jquery.slimscroll.min.js\"></script>\r\n        <script src=\"Scripts/jquery.fullPage.js\" type=\"text/javascript\"></script>\r\n        <script src=\"Scripts/examples.js\" type=\"text/javascript\"></script>\r\n        \r\n        <script type=\"text/javascript\">\r\n            $(document).ready(function () {\r\n                $('#fullpage').fullpage({\r\n                    anchors: ['firstPage', 'secondPage', '3rdPage', '4thPage', '5thPage', '6thPage'],\r\n                    menu: '#menu',\r\n                    scrollOverflow: true,\r\n                    resize: false,\r\n                    controlArrows: false,\r\n                    slidesNavigation: true\r\n                });\r\n            });\r\n        </script>\r\n\r\n        <style>\r\n            body {\r\n                overflow:auto;\r\n            }\r\n        </style>\r\n\r\n    </head>\r\n    <body>\r\n        <form id=\"form1\" runat=\"server\">\r\n            <asp:ScriptManager ID=\"ScriptManager1\" runat=\"server\"></asp:ScriptManager>\r\n\r\n            <div>\r\n                <table cellpadding=\"0\" cellspacing=\"0\" border=\"0\" style=\"width:100%;\">\r\n                    <tr>\r\n                        <td valign=\"top\">\r\n                            <table cellpadding=\"0\" cellspacing=\"0\" border=\"0\" style=\"width:100%;\">\r\n                                <tr>\r\n                                    <td>\r\n                                        <asp:Image ID=\"Image1\" runat=\"server\" ImageUrl=\"Images/Gift4MeLogo.png\" ImageAlign=\"Middle\" />\r\n                                        <asp:Label ID=\"lblWelcome\" runat=\"server\" CssClass=\"heading4\" style=\"font-size:48px;padding:0px;margin:0px;height:76px;\" />\r\n                                    </td>\r\n                                </tr>\r\n                                <tr>\r\n                                    <td>\r\n                                        <div>\r\n                                            <ul id=\"menu\">\r\n\t                                            <li data-menuanchor=\"firstPage\" style=\"width:100px; text-align:center;\"><a href=\"#firstPage\">Home</a></li>\r\n\t                                            <li data-menuanchor=\"secondPage\" style=\"width:100px; text-align:center;\"><a href=\"#secondPage\">Profile</a></li>\r\n                                                <li data-menuanchor=\"3rdPage\" style=\"width:100px; text-align:center;\"><a href=\"#3rdPage\">Help</a></li>\r\n                                                <li data-menuanchor=\"4thPage\" style=\"width:100px; text-align:center;\"><a href=\"#4thPage\">Friends</a></li>\r\n                                                <li data-menuanchor=\"5thPage\" style=\"width:100px; text-align:center;\"><a href=\"#5thPage\">Wishes</a></li>\r\n                                                <li data-menuanchor=\"6thPage\" style=\"width:100px; text-align:center;\"><a href=\"#6thPage\">Events</a></li>\r\n                                            </ul>\r\n                                        </div>\r\n                                    </td>\r\n                                </tr>\r\n                            </table>\r\n                        </td>\r\n                        <td>\r\n                            <div id=\"fullpage\">\r\n\t                            <div class=\"section\" id=\"section1\">\r\n                                    <hme:Home ID=\"hme1\" runat=\"server\" />\r\n\t                            </div>\r\n\t                            <div class=\"section\" id=\"section2\">\r\n                                    <div class=\"slide\">\r\n                                        <prf:Profile ID=\"prf1\" runat=\"server\" />\r\n                                    </div>\r\n                                    <div class=\"slide\">\r\n                                        <set:Settings ID=\"set1\" runat=\"server\" />\r\n\t\t                            </div>\r\n\t                            </div>\r\n                                <div class=\"section\" id=\"section3\">\r\n                                    <help:Help ID=\"help1\" runat=\"server\" />\r\n\t                            </div>\r\n                                <div class=\"section\" id=\"Div1\">\r\n                                    <frd:Friends ID=\"frd1\" runat=\"server\" />\r\n\t                            </div>\r\n                                <div class=\"section\" id=\"Div2\">\r\n                                    <wsh:Wishes ID=\"wsh1\" runat=\"server\" />\r\n\t                            </div>\r\n                                <div class=\"section\" id=\"Div3\">\r\n                                    <evn:Events ID=\"evn1\" runat=\"server\" />\r\n\t                            </div>\r\n                            </div>\r\n                        </td>\r\n                        <td valign=\"top\" style=\"text-align:right; padding-right:10px; padding-top:5px;\">\r\n                            <div>\r\n                                <hdr:Header ID=\"hdr1\" runat=\"server\" />\r\n                            </div>\r\n                        </td>\r\n                    </tr>\r\n                </table>\r\n            </div>\r\n        </form>\r\n    </body>\r\n</html>"},"comment":{"url":"https://api.github.com/repos/alvarotrigo/fullPage.js/issues/comments/138851940","html_url":"https://github.com/alvarotrigo/fullPage.js/issues/1494#issuecomment-138851940","issue_url":"https://api.github.com/repos/alvarotrigo/fullPage.js/issues/1494","id":138851940,"user":{"login":"rickyg91","id":10337776,"avatar_url":"https://avatars.githubusercontent.com/u/10337776?v=3","gravatar_id":"","url":"https://api.github.com/users/rickyg91","html_url":"https://github.com/rickyg91","followers_url":"https://api.github.com/users/rickyg91/followers","following_url":"https://api.github.com/users/rickyg91/following{/other_user}","gists_url":"https://api.github.com/users/rickyg91/gists{/gist_id}","starred_url":"https://api.github.com/users/rickyg91/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/rickyg91/subscriptions","organizations_url":"https://api.github.com/users/rickyg91/orgs","repos_url":"https://api.github.com/users/rickyg91/repos","events_url":"https://api.github.com/users/rickyg91/events{/privacy}","received_events_url":"https://api.github.com/users/rickyg91/received_events","type":"User","site_admin":false},"created_at":"2015-09-09T09:22:29Z","updated_at":"2015-09-09T09:22:29Z","body":"Ok so I have a website using fullpage.js. Each section points to a control.ascx. So section1 will point to the home.ascx control and section2 will point to the profile.ascx control. Everything works perfectly and I am able to scroll through the sections, but if I am on section2 and I decide to type text into a text box and then click the button to save it to my SQL Database, it then starts processing and once its done writing to the database it jumps back to the first anchor at section1."}}