views:

323

answers:

1

I've got a series of ModalPopupExtenders that I'm using to implement popup dialogs on an ASP.NET 2.0 page.

When they popup it's fairly easy to specify the location where they appear using the constructor using X and Y coordinates but I'm unsure how to deal with changes of window size which alters where they should be in cartesian space. I need them to appear relative to some other elements on the page.

I've tried hooking into the onresize javascript function in IE but this is broken and fires whenever a div changes size (problematic really given that i have lots of CollapsiblePanelExtenders in the UI.

Anybody ever done this and have any suggestions how i can get this working?

Edit : This code helps no end in capturing the resize event... http://blog.stchur.com/2006/09/06/the-ie-resize-bug-revisited/

+1  A: 

I've figured out how to do this.

I use onClickClick to display the modal popup after figuring out where to put them by getting the x + y coordinates from a known control from the DOM. Upon resize (from http://blog.stchur.com/2006/09/06/the-ie-resize-bug-revisited/) i've decided to just hide the popups

Gordon Carpenter-Thompson