I have a aspx page which contains an UpdatePanel and an accompanying js file consisting of two functions
- $(document).ready() - which has code that needs to be executed only once after the page loads
- 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.