Take the 2-minute tour ×
SharePoint Stack Exchange is a question and answer site for SharePoint enthusiasts. It's 100% free, no registration required.

How to load page load javascript when update progress is over.

$(function() {

// how to load this after update progress is over

}

Explanation

My Grid inside update panel..

In Grid some of textbox controls.

I fired javascript on that textboxes when page load.

My javascript run perfect when page load.

when i button click(with AsyncPostBackTrigger) again grid refreshed without page postback(because of update panel).

so my javascript not fired when grid refreshed again.

How to run javascript again....

share|improve this question
    
There are many meanings for "update progress", please explain. Also, what have you tried? –  thantos Dec 24 '12 at 12:06
add comment

3 Answers

Put your page load code into one or more functions and then call those functions when your update progress is over.

share|improve this answer
    
How to call that function when update progress is over –  Hitesh Chandegara Dec 24 '12 at 6:44
2  
@Chandegara - what is "update progress"? That is not a standard term in browsers. You need to explain what "update progress" is so we can advise on how to hook your code to the completion of that. Is it a SharePoint event? –  jfriend00 Dec 24 '12 at 6:52
add comment

You can to use ExecuteOrDelayUntilScriptLoaded and the script will execute after the process.

<script type="text/javascript">
    window.onload = function(){ ExecuteOrDelayUntilScriptLoaded(ViewItem, "sp.js"); };
</script>
share|improve this answer
add comment

There are a few ways you could do this.

One way is register a start-up script in the behind code using the ScriptManager

ScriptManager.RegisterStartupScript(Page,Page.GetType(),"MyScript","MyCodeHook()",true);

This will call the provided code when the page does the async postback.

Another method is to use the PageRequestManager MSDN

share|improve this answer
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.