Showing posts with label briefly. Show all posts
Showing posts with label briefly. Show all posts

Wednesday, March 21, 2012

ModalPopup - content shows briefly when page loads

Hi,

I have a some problem with the modalpopup control. Its on everytime a full postback happens, the browser "displays" all the content of my modalpopup, in way that how it's going to look like when you dont add the extender to your panels. The panels then "disappear" after the page is loaded, and the modalpopups work as they are supposed to.

how do i prevent the panels from "blinking"/showing on full page postbacks?

Add style="display:none;" to the panels.


this seems to work. thanks!

however i have one question. before, I was adding display:none; to my panels through the css class on a separate css file. it wouldnt work that way since the panels will disappear forever. it only works when i put display:none; on the <asp:Panel> from the html source. why is it like that?


I believe that the modalpopup works by toggling the style attribute but if you have display:none permanently set in the CSS then it isn't going to work. Bit of a pain I know but not a huge deal to add it to the panel.

ModalPopup & Screen Flicker

Just as with the other controls, when the page first loads you briefly see the controls before they are hidden. However, with the modal if you set the control's visibility to hidden, it will not display when it's poped up.

Is this a known bug? or someting else?

This behavior happens to me too...
My popup panel is declared as follow, the same as the sample included in the toolkit:

<asp:Panel ID="MoveItemDialogPanel" runat="server" CssClass="modalPopup" style="display:none;" >
...

Urhh ... it's not a bug in Atlas or the toolkit ... it's a problem with the style sheets / CSS that you used. Most, if not all, of the samples work properly as shipped. Hundreds of different posts in the forum over this particular issue.

I've run into the same problem with Collapsible, Hover and ModalPopup. What you have to be really careful of ... is ensuring that if you do copy & paste (which I did) that you ensure that you've got all of the CSS in place as well.

What Atlas (and other Ajax frameworks) are doing is taking advantage of the evolution of browsers and CSS. You get the "fast" response and neat effects in the browser(s) because the markup is already their in the DOM ... it's simply not visible and/or had its behaviors (event sinks) hooked up until necessary. This coupled with "smarter" postbacks (i.e don't post back every possible input field on the page, hidden viewstate, etc) ... result in less over-the-wire data movement ... less processing at the server and an overall "snappier" user experience.

All of this has been doable for years ... it's just really hard to hand-write all that markup and javascript ... and get all the edge cases correct.

ModalPopup and ASP:Panel

Hi

I've used a modalpopup to display an asp:panel which is working fine. The problem is the panel briefly flashes on the page then disappears. I don't want this. I can gewt rid of this effect if I set the panel visible property to false but then the popup wont work, if it's true then it does work.

Can anyone tell me why or how to get around it

Cheers
Jon

Hello Jon,

I am having the same problem with other Toolkit controls. It seems to be a small thing but it gets annoying! There must be something simple to stop this behaviour.

The only comparison between us is the panel. I wonder if it is something to do with the panel and the toolkit. If i find anything then I will let you know.

Sorry I am not replying with an answer but I think it is good to find someone else with the same problem.


Hello John,

I have found the answer for my problem so hopefully it will help you. I had a thought that i hadn't seen this behaviour in the toolkit live samples so had a look at the sample website code for my specific component and it looks like you need to put the following into your panels CSS or in the style:

<asp:panel id="panTest"style="display:none; visibility:hidden;"

It has worked from me and now I cannot see an annoying flash :)

I hope it works for you.


Hello again,

Actually you cannot add it to a stylesheet. It has to be added directly to the panel on the page for it to work. I added it to the stylesheet and it would not show the panel at all.


I was not able to get it to work when style includes visibility:hidden

<asp:Panelrunat="server"ID="Panel1"CssClass="modalPopup"style="display:none;visibility:hidden;">

But this worked

<asp:Panelrunat="server"ID="Panel1"CssClass="modalPopup"style="display:none;">


Thanks Guys! Had the same problem and this solved it.


Thanks! I have solved it!