LuxCal Forum

The place for questions, suggestions and news about the LuxCal Event Calendar

User:   Password:   Remember Me?   
LuxCal Forum / General / Problems / Browser issues
Posted:  24 Aug 2012 22:25   Last Edited By: Roel B.
Hello again,

Thought I would combine a few browser related issues into one post.

1. When using Chrome, any pop up window is resized and loses its height.  Has anyone run into this issue?
Does this relate?

2. When using Firefox14 or IE9 and the calendar is viewed within an iframe, after printing and clicking ok in the print ready window, I get this message (firefox):


To display this page, Firefox must send information that will repeat any action (such as a search or order confirmation) that was performed earlier.
I believe this has to do with POST data.  It works correctly without the iframe, but with it, that message pops up.

Any ideas?
Posted:  24 Aug 2012 22:52   Last Edited By: Roel B.
Hi Michael,

1. Chrome pop-up window resize problem
On our test sites we don't have this problem in Chrome. The issue pointed to by your link is slightly related, but doesn't cause the problem. The article says that the JavaScript function window.resizeTo doesn't work for popup windows. This is true and exactly therefore the calendar uses the JavaScript function window.resizeBy to resize its popup windows.
Could you send me the URL to your calendar (for instance via the Contact Us page), so that I can further analyze this problem.

2. Firefox warning message when printing
This looks to me a generic warning message which is harmless but annoying. Maybe this can be disabled in the browser's options.

We're working on a LuxCal print option for each view.

Posted:  27 Aug 2012 20:43
Unfortunately it is an internal site.

After looking through the code, in the winFit function, the currentH variable is grabbing the height of the main window, not the height of the popup window.

I'll see if I can get any further, but that is the issue I see right now.

I'll see if I can find anything within Firefox for that message as well.

Posted:  27 Aug 2012 22:11   Last Edited By: Roel B.
Hi Michael,

There is only one window. The winFit function is called "onload" of the popup window. The popup window stands on itself and is the main window.
currentH takes the value of the innerHeight of the window or, if the browser doesn't support innerHeight (IE8 and earlier), it takes the value of the clientHeight of the window.
Chrome supports innerHeight.
Posted:  27 Aug 2012 22:26
Poor choice of words on my part.  I agree that there is one window, in this case the popup window showing the login fields.  The issue I was running into was that it was grabbing the height dimension from the calendar window, not the newly created popup window for logging in.

I added a timeout on the winFit function and it seems to work now.  I guess Chrome was working too fast for its own good?

function winFit(maxH){
    neededH = Math.min(maxH,$I('bodyArea').offsetHeight + 6);
    currentH = window.innerHeight ? window.innerHeight : document.documentElement.clientHeight;
    }, 75);
Posted:  27 Aug 2012 23:04   Last Edited By: Roel B.
Hhmm, interesting! Thanks for letting me know.
For the Event window, the Help window and the mini-calendar I've replaced <body onload="winFit(700)" by window.onload. Window.onload is fired when the window has fully loaded and consequently should solve this timing problem. This fix will be included in the next LuxCal sub-release.
Posted:  28 Aug 2012 16:37
As for my other issue while printing, I've changed the javascript function printNice.  I removed window.relocation.reload(); and replaced it with window.location = window.location.href;

Seems to be working without any side effects :)
Posted:  28 Aug 2012 23:06   Last Edited By: Roel B.
Thanks for this solution Michael.
Although "reload()" is more straight forward, your solution is much better.
Your solution is in particular interesting, because it can also be used to avoid the browser message in the main calendar window when an event is added/edited/deleted in the Event window. This is a real improvement!

I've thoroughly tested this change in the different browsers and see no side effects indeed. I will copy this solution into the next LuxCal sub-release.