Welcome Guest Search | Active Topics | Sign In | Register

ContentUrl in Dialog Box Question Options
Jason S
Posted: Monday, July 7, 2008 1:23:46 PM
Rank: Member
Groups: Member

Joined: 5/30/2007
Posts: 23
Hello,

I am using a Dialog control to show an .aspx page on the server in the dialog box. The first time the page is loaded, when opening the dialog box, the .aspx page is loaded(hits the server). Every time after that, when the show() function is called it shows a cached version of the .aspx page. I would like to hit the server every time the dialog box is shown, as it is rendering dynamic content. I tried setting the client side event setContentUrl() before calling the show() function in the javascript, but this doesn't seem to be working. Even tried appending a random query string to the content url?

Thanks in advance,
Jason
eo_support
Posted: Monday, July 7, 2008 1:28:51 PM
Rank: Administration
Groups: Administration

Joined: 5/27/2007
Posts: 24,193
Hi Jason,

That is not in anyway related to our dialog, it has to do with your page's cache control. You would get the same result even if you were to display the page directly in the browser. You can Google ASP.NET page cache control and you should be able to find plenty of articles about this.

Thanks
Jason S
Posted: Monday, July 7, 2008 2:15:37 PM
Rank: Member
Groups: Member

Joined: 5/30/2007
Posts: 23
Thanks for the quick response! I had already verified that it did not seem to be a caching issue. As you said about hitting page directly in the browser, I have done this and every time the page is served, the server is hit(no cached content displayed). Both the contentUrl and the containing page of the dialog box are being set to not cache the page, as you can see here:


This is the parent page HTTP Headers that the dialog box is embedded in:

HTTP/1.x 200 OK
Server: Microsoft-IIS/5.1
Date: Mon, 07 Jul 2008 20:59:51 GMT
X-Powered-By: ASP.NET
X-AspNet-Version: 2.0.50727
Pragma: no-cache
Cache-Control: no-cache
Content-Type: text/html; charset=utf-8
Content-Length: 85323


This is the dialog box contentURL HTTP Headers(Expires header set to expire immediately):

HTTP/1.x 200 OK
Server: Microsoft-IIS/5.1
Date: Mon, 07 Jul 2008 21:00:49 GMT
X-Powered-By: ASP.NET
X-AspNet-Version: 2.0.50727
Pragma: no-cache
Cache-Control: private
Expires: Mon, 07 Jul 2008 20:59:49 GMT
Content-Type: text/html; charset=utf-8
Content-Length: 11021


This is my client side code:

<eo:Dialog ID="RateCalcPopup1" runat="server" BackColor="#FFBF80" Height="350px" Width="230px"></eo:Dialog>

This is my server side setup for 1 dialog box on the page to be opened from different anchors:

RateCalcPopup1.ContentUrl = (_sunClass.GetNonSecureApplicationRoot & "RateCalculator.aspx")
RateCalcPopup1.ShowEffect.Type = EO.Web.EffectType.Fade
RateCalcPopup1.ShowDirection = EO.Web.ExpandDirection.BottomLeft
RateCalcPopup1.ShowButton = "RateCalcLnk"
RateCalcPopup1.CloseEffect.Type = EO.Web.EffectType.Fade
RateCalcPopup1.CloseButtonUrl = "00070101"
RateCalcPopup1.MinimizeButtonUrl = "00070102"
RateCalcPopup1.RestoreButtonUrl = "00070103"
RateCalcPopup1.IsModal = False
RateCalcPopup1.OffsetX = 175
RateCalcPopup1.OffsetY = -10
RateCalcPopup1.HeaderHtml = "<span id='rateCalcHeaderTxt'>Rate Calculator</span>"

This is the client-side javascript that the multiple anchors call to show the dialog box:

var popupRate;
function rateCalcMultiShow(obj, rate){
popupRate = rate;
var rateClcPopup = eo_GetObject('RateCalcPopup1');
if(rateClcPopup){rateClcPopup.show();}
}

One more thing. Like I said the 1 dialog box is set to be opened from multiple anchors. Each time the default EO close button is used to close the dialog box, and when another anchor is clicked the client-side js above is called to retrieve the dialog object and call it's show() method.

Please let me know if you have any ideas how to fix this.

Thanks in advance!
eo_support
Posted: Monday, July 7, 2008 2:38:27 PM
Rank: Administration
Groups: Administration

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

Ah...I see the problem. Sorry about having missed that in our first reply.

Calling setContentUrl once won't work because apparently IE is smart enough to determine that it is still the same page so nothing needs to be done. You can try to call setContentUrl to a blank page when the dialog hides and then set it back to the real page when the dialog is displayed again.

We will incorporate the above logic into our code in our next build. The new build will be in release 2008, so if you already have a license you may want to check whether your license covers 2008. If it does, you may want to wait for a few days for the new build so that you won't need to write any workaround code at all.

Thanks
Jason S
Posted: Monday, July 7, 2008 3:15:29 PM
Rank: Member
Groups: Member

Joined: 5/30/2007
Posts: 23
Yes, that works fine. In trying this solution, I realized I was calling setContentUrl = 'xyxy' instead of setContentUrl('xyxy') in my previous testing. Doh!! (Smacking head for not looking at api close enough)

Anyways, thanks again for your help. Look forward to the next build!
eo_support
Posted: Tuesday, July 8, 2008 6:52:14 PM
Rank: Administration
Groups: Administration

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

We have posted a new build that addressed this issue. Please see your private message for download location.

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.