floatbox window.onunload behavior

Page: 1

Author Post
Member
Registered: Feb 2013
Posts: 30
Dear Admin,
i'm working with multiple floatboxes and want to save the size and position into a db before the user leaves the page.

Out of the fact, that fb doesn't support a callback event 'afterMovement' of the box, i have to read out the positions & size by:

fb.getInstance(instance[key]).fbContentWrapper.clientWidth;
...

The read of those parameters works fine, except before the user quits the page.

Than the fb.getInstance call returns null - and it seems like all instances are already de-registered at this time, but no beforeEnd or afterEnd event got fired at this situation.

Any suggestions or explanations how to catch those parameters before quitting?
Thanks and best regards,
Wolfgang
Member
Registered: Feb 2013
Posts: 30
solved it meanwhile - at window.onbeforeunload fb instances still exist, so it works:

window.onunload = window.onbeforeunload = function(){
saveWidth(fb.getInstance(instance[key]).fbContentWrapper.clientWidth);
...
}

thanks & cheers,
wolfgang

Page: 1