This is a migrated thread and some comments may be shown as answers.

[Solved] .OnResize event not firing

1 Answer 205 Views
Ajax
This is a migrated thread and some comments may be shown as answers.
topry
Top achievements
Rank 1
topry asked on 09 Apr 2009, 10:00 PM
Using VS2008 and 2009 Q1 version of the controls:

Web App has a masterpage with RadScriptManager and RadAjaxManager.
UserControls have a RadAjaxManagerProxy control.
The controls are dynamically loaded into forms and divs/controls within them resized according to function.

Within the MasterPage itself, window.onresize works correctly, however within my UserControls it does not.
In testing with a barebones control (nothing on it), window.onresize would never fire, but window.parent.onresize would.
But when I add the RadAjaxManagerProxy, the window.parent.onresize is no longer received.

If I use $addHandler:
$addHandler(window, 'resize', resize); 
Then the event is fired as expected.

Tested in IE7, Safari and Chrome, all with same results.

Is this a known issue or is there a better way to handle this?

1 Answer, 1 is accepted

Sort by
0
Georgi Krustev
Telerik team
answered on 13 Apr 2009, 02:38 PM
Hello Tim,

Unfortunately I am not able to determine where the exact source of the issue is depending on the given information. The possible cause of the depicted behavior is that the event handlers are not wired on subsequent loads after an ajax request.

I will suggest you wrap the JavaScript code in a RadScriptBlock to see whether this helps. For further information you can review this online help article.

Best regards,
Georgi Krustev
the Telerik team

Check out Telerik Trainer , the state of the art learning tool for Telerik products.
Tags
Ajax
Asked by
topry
Top achievements
Rank 1
Answers by
Georgi Krustev
Telerik team
Share this question
or