Pages

Showing posts with label javascript. Show all posts
Showing posts with label javascript. Show all posts

Friday, October 25, 2013

IE11 and Windows 8.1 : Solution for __doPostBack and Ajax not working

​Following Steps are performed to fix IE 11: ajax and __dopostback issues:
There are 2 solutions:
1. Site Level Fix:
   step 1: Perform Steps from following links
        http://www.nuget.org/packages/App_BrowsersUpdate/
  
   step 2: In ie.browser add mentioned settings from following link
           http://stackoverflow.com/questions/18009636/crosspostback-ajax-controls-and-asp-net-generated-postbacks-work-for-net-4-5

2. Machine Level Fix:
   Main Source: http://www.hanselman.com/blog/IE10AndIE11AndWindows81AndDoPostBack.aspx
   Step 1: Download patch from following link.
     http://support.microsoft.com/kb/2836939
   Step 2: install patch

Friday, June 7, 2013

javascript don't execute after partial postback

If you are doing partial postback in your page then code on $(document).ready() function will not execute.
You will experience when page loads then your javascript functionality works but after partial postback your code is not working
For resolve this issue you need to write code in following format.

Write genral code in SetLocalValues() function which you want to call on $(document).ready() function

var prm = Sys.WebForms.PageRequestManager.getInstance();
prm.add_endRequest(function () {
//Write your code here
//This function executes after partial postback so you need to call $(document).ready() functions code here
});

$(document).ready(function () {
        SetLocalValues();
});

var prm = Sys.WebForms.PageRequestManager.getInstance();
prm.add_endRequest(function () {
        SetLocalValues();
});
function SetLocalValues() {
//Write your code
}