Showing posts with label initial. Show all posts
Showing posts with label initial. Show all posts

Wednesday, March 28, 2012

Modal Popup Extender blinks on page on initial page load

Hello,

I am getting some undesirable behavior from the modal popup extender control. Everything works fine except for the fact that when i load or reload the page, you can see the modal popup box at the bottom of the page blink for about 1 second and then disappear. Why does it do this? Has anyone else seen this before? I would rather not see the box blink at the bottom of the page when loading the page, it just looks weird. Other than that, it appears fine when i click my button. Its just annoying to see it on the page load.

Any ideas here?

usually you need to set the style='display:none'


awsome...that did the trick...in the panel tag i did this:

<asp:Panel ID="pnlModalCheckUser" runat="server" Height="110px" Width="250px" CssClass="modalPopup"style="display:none">

even though style didn't come up as a valid property for the asp:panel tag in intellisense. But it works, i'm assuming it just passed the style along to the processed div tag.

Thanks a bunch!

Wednesday, March 21, 2012

ModalPopup and FileUpload

I created a ModalPopup with a FileUpload control inside it. After some initial frustration with trying to get the ModalPopup "OK" button to Postback to the server, I found a thread that suggested setting the UseSubmitBehavior property to false, which did the trick. However, in the click event of my OK button, FileUpload1.HasFile is false, even though I did browse for a file. Any idea why? And how to fix it? Thanks!There are a couple of threads talking about how the 60504 version of ModalPopup does its magic by moving controls around on the form and incorrectly moves things outside the <form> element. I eventually posted a solution that relies on the zIndex CSS property. Please try applying that change to your ModalPopup sources and see if it helps here. If not, please let us know! Thanks.
I tried David Anson'sfix, but it doesn't seem to be working. Perhaps I didn't insert the code right? Or something? I went to the folder where I installed Atlas and drilled down to AtlasControlToolkit/ModalPopup/.... Here I made a backup of ModalPopupBehavior.js, and then inserted the code David wrote where it clearly fit. I restarted Visual Studio in case it needed to reload or something, but it still doesn't work. I opened the DOM Inspector and sure enough the panel is still outside the form. Am I missing something? Thanks!
The change I posted about using zIndex does not move the panel (verified by others on this forum), so if you're seeing the panel be moved after attempting to apply the fix, then something about how the fix was done would seem to be in error. Please double-check what you've done and post your ModalPopupBehavior.js you're unable to get the change to take effect.