Monday, March 26, 2012

UpdatePanel : Fire client event after load

Hi..

Iam jusing updatepanel as a modalpopup, for other reasons i cannot use the modal popup control - so i style my updatePanel as a popup, and it works fine.

But i need to fire an event when the content is loaded. I need to set the position of the layer, so i can horizontal and vertical align it depending on its content.

1 : i cannot set onload event on the layer, onload can only be set on form body and img tags.
<div id="dialogLayer" onload="event()">
2 :
<updatePanel>
<div id="dialogLayer"
</div>
<script type="text/javascript">
event();
</script>
</updatePanel>
does not fire at all

Sorry my poor english, but ill hope someone can help - is there eny event in asp:updatepanel i can use ?

Thanks in advance.

Jacob Jensen.

take a look here:

http://ajax.asp.net/docs/tutorials/UpdatePanelClientScripting.aspx


Thx, u just save me a lot of time :)

/Jacob


if that worked for you, can you mark my post as "question answered"? Thanks :)

No comments:

Post a Comment