Welcome Guest Search | Active Topics | Sign In | Register

How to clear Dialog contents after it has been used Options
Peter249
Posted: Wednesday, September 4, 2013 7:26:25 AM
Rank: Advanced Member
Groups: Member

Joined: 5/15/2013
Posts: 34
Hi,

I have a dialog which is reused many times by the client.

During development I did notice a quick flash of old content when the Dialog is displayed, but now that I have it up into production (and on a real server) some of the dialog content fetches can take 2 to 3 seconds, which the old content is displayed while the new content is being fetched from the server.

Is there a way of clearing the dialog contents when the Dialog is shown??

Or even displaying a loading cursor or displaying "Loading...." inside the Dialog when the server fetch is happening ??

Some clients 2 to 3 seconds is just to long to wait......


Dialog code:
Code: HTML/ASPX
<eo:Dialog ID="Dialog1" runat="server" CloseButtonUrl="00020440" ControlSkinID="None" HeaderHtml='Dialog1' HeaderHtmlFormat="&lt;div style=&quot;padding-top:4px&quot;&gt;{0}&lt;/div&gt;" HeaderImageHeight="27" HeaderImageUrl="00020441">
        <HeaderStyleActive CssText="background-image:url(00020442);color:#444444;font-family:'Arial';font-size:10pt;font-weight:bold;padding-bottom:7px;padding-left:8px;padding-right:0px;padding-top:0px;" />
        <ContentStyleActive CssText="background-color:#f0f0f0;font-family:Arial;font-size:8pt;padding-bottom:4px;padding-left:4px;padding-right:4px;padding-top:4px" />
        <ContentTemplate>
          <iframe id="Dialog1Frame" src=""></iframe>
        </ContentTemplate>
        <FooterStyleActive CssText="background-color:#f0f0f0; padding-right: 4px; padding-left: 4px; font-size: 8pt; padding-bottom: 4px; padding-top: 4px; font-family: Arial" />
        <BorderImages BottomBorder="00020409,00020429" BottomLeftCorner="00020408,00020428" BottomRightCorner="00020410,00020430" LeftBorder="00020406,00020426" RightBorder="00020407,00020427" TopBorder="00020402,00020422" TopLeftCorner="00020401,00020421" TopLeftCornerBottom="00020404,00020424" TopRightCorner="00020403,00020423" TopRightCornerBottom="00020405,00020425" />
    </eo:Dialog>



Thanks
eo_support
Posted: Wednesday, September 4, 2013 9:14:21 AM
Rank: Administration
Groups: Administration

Joined: 5/27/2007
Posts: 24,229
Hi,

The dialog won't do any magic for this case. Since it's your own iframe, you might be able to do something with the iframe to avoid such problems. However we are not aware of any sure fire methods to refresh an iframe without delay.

Thanks!
DiscoverSoft
Posted: Friday, February 3, 2017 11:03:52 AM
Rank: Advanced Member
Groups: Member

Joined: 2/27/2010
Posts: 69
Is there a way to clear the dialog prior to setContentUrl? I use the same dialog control on the master page for several different popups. But it always flashes the previous url prior to displaying the new one. I've tried clearing it by setContentUrl to a blank page prior to loading the actual target, but it still flashes the previous one.

Please advise.

Code: Visual Basic.NET
<eo:Dialog ID="diagMaster" runat="server" BackColor="#EDECE9" ControlSkinID="None" HeaderHtml="Dialog Title" Height="150px" Width="250px" ContentUrl="DiagDummy.aspx" HorizontalAlign="Center" VerticalAlign="Top" AnchorElementID="" TopMost="True" BackShadeColor="DarkGray" BackShadeOpacity="50">
            <HeaderStyleActive CssText="background-image:url('00020311');color:black;font-family:'trebuchet ms';font-size:10pt;font-weight:bold;padding-bottom:5px;padding-left:8px;padding-right:3px;padding-top:0px;height:18px;" />
            <ContentStyleActive CssText="padding-right: 4px; padding-left: 4px; font-size: 8pt; padding-bottom: 4px; padding-top: 4px; font-family: tahoma" />
            <FooterStyleActive CssText="padding-right: 4px; padding-left: 4px; font-size: 8pt; padding-bottom: 4px; padding-top: 4px; font-family: tahoma" />
            <BorderImages BottomBorder="00020305" BottomLeftCorner="00020304" BottomRightCorner="00020306" LeftBorder="00020303" RightBorder="00020307" TopBorder="00020310" TopLeftCorner="00020301" TopLeftCornerBottom="00020302" TopRightCorner="00020309" TopRightCornerBottom="00020308" />
            <ContentTemplate>
            </ContentTemplate>
        </eo:Dialog>
eo_support
Posted: Friday, February 3, 2017 1:43:39 PM
Rank: Administration
Groups: Administration

Joined: 5/27/2007
Posts: 24,229
Hi,

You won't be doing it through the dialog. You would do it through a ContentTemplate like the original post. That way you can use JavaScript to easily clear the ContentTemplate before you update it to a new Url. For example, the original post uses an iframe and you can write JavaScript code to delete that iframe and then create a new iframe with the new Url before you show the dialog. That way by the time the dialog is shown the old iframe has already been deleted, thus avoiding any of the old contents to be shown.

Thanks!


You cannot post new topics in this forum.
You cannot reply to topics in this forum.
You cannot delete your posts in this forum.
You cannot edit your posts in this forum.
You cannot create polls in this forum.
You cannot vote in polls in this forum.