0

I have a aspx page which contains an UpdatePanel and an accompanying js file consisting of two functions

  1. $(document).ready() - which has code that needs to be executed only once after the page loads
  2. function pageLoad() - which has code that needs to be executed everytime a partial postback happens.

This setup was working exactly fine, until another team decided to put my whole page into an iframe. The document structure now looks like this.

<iframe>
  #document
   <html>
       <head> </head>
       <body> </body>
   </html>
</iframe>

Now, the pageLoad() function doesnt get executed during partial postback. I did some research and found out other ways of calling functions as mentioned in this question

Execute javascript after a partial postback of an updatepanel?

But none of these seem to work when iframe is present. I used System.Web.UI.ScriptManager.RegisterClientScriptBlock() on a click function which causes the postback too. Even that didnt work.

tl;dr : pageLoad() stopped working after i put my whole document inside an iframe. How do i made the code inside that function get called after every partial postback ?

Thanks a lot for your time in advance.

Community
  • 1
  • 1
Pradep
  • 1,874
  • 5
  • 21
  • 31
  • As per my knowledge, pageLoad() is called everytime there is a postback. For partial postback, you need to check isPartialLoad().i.e, pageLoad(args,sender) { if(args.isPartialLoad). Could you post all the code here ? – DinoMyte Sep 25 '14 at 22:16
  • Hi @DinoMyte , I made it work by registering a client script block in a different way. I have a different issue now. Ill ask a new question for that. Thanks ! – Pradep Sep 30 '14 at 15:21

0 Answers0