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

Form default button and RadWindow

4 Answers 154 Views
Window
This is a migrated thread and some comments may be shown as answers.
Andrey
Top achievements
Rank 1
Andrey asked on 11 Mar 2009, 11:01 AM
When I try to open page with defaultbutton in RadWindow, scroll on parent page sets to top.

Parent page:
<html xmlns="http://www.w3.org/1999/xhtml" > 
<head runat="server"
    <title></title
</head> 
<body> 
    <form id="form1" runat="server"
    <telerik:RadScriptManager ID="scriptManager" runat="server" /> 
    <div> 
        <div style="height:1500px"
        </div> 
        <asp:Button ID="bntTest" runat="server" Text="Show Window"  
            OnClientClick="javascript:var w = $find('testWindow'); w.setUrl('WindowPage.aspx'); w.show(); return false;" /> 
        <telerik:RadWindowManager ID="radWindowManager" runat="server"
            <Windows> 
                <telerik:RadWindow ID="testWindow" runat="server" Width="900px" Height="600px" Left="50px"  
                    Modal="true" ShowContentDuringLoad="false" Behaviors="Default" VisibleStatusbar="false"  
                    EnableEmbeddedSkins="true" Skin="Vista"
                </telerik:RadWindow> 
            </Windows> 
        </telerik:RadWindowManager> 
    </div> 
    </form> 
</body> 
</html> 

Window page
<html xmlns="http://www.w3.org/1999/xhtml" > 
<head runat="server"
    <title></title
</head> 
<body> 
    <form id="form1" runat="server" defaultbutton="btnDefault"
    <div> 
        <asp:Button ID="btnDefault" runat="server" Text="DefaultButton" /> 
    </div> 
    </form> 
</body> 
</html> 

4 Answers, 1 is accepted

Sort by
0
Fiko
Telerik team
answered on 16 Mar 2009, 12:17 PM
Hi Andrey,

In your case I suggest to set the ShowContentDuringLoad property of the RadWindow control to "true".


Best wishes,
Fiko
the Telerik team

Instantly find answers to your questions on the new Telerik Support Portal.
Check out the tips for optimizing your support resource searches.
0
Andrey
Top achievements
Rank 1
answered on 17 Mar 2009, 07:16 AM
It doesn't work.
0
Accepted
Fiko
Telerik team
answered on 17 Mar 2009, 03:11 PM
Hello Andrey,

In reference to your question I prepared a simple demo based on your code. I tested it as follows :
  • open the parent page, then click on the "Show Window" button
  • the RadWindow opens, and the parent page scrolls to top of the page - RadWindow become invisible ( it stayed on the bottom of the parent page).
  • then I remove the defaultbutton="btnDefault" part of the content page, closed the browser and open the parent page again. As a result the page does not scroll.
All of these steps I tested with IE7 and FF 3.0.x browsers.

Then I set the ShowContentDuringLoad  property to "false" in the  RadWindow's declaration and this solved the problem under IE. Under FF the parent page continues scrolls, but this behavior can be observed with an standard IFRAME ( instead of RadWindow )as well and we cannot override this browser behavior.
In the attached file you can see the behaviors under IE and FF ( under FF - by using RadWindow and by using an IFRAME).

All of the above-described steps I tested with 2008.3_1314 and 2009.1_311 versions of our ASP.NET AJAX controls with ShowContentDuringLoad="true"  in the RadWindow's declaration and "defaultbutton="btnDefault" in the <form> tag of the content page. I attached three screen videos of the behaviors under IE and FF ( FF - by using RadWindow and by using IFRAME).

In case that your problem is different, could you please provide us with more detailed information about the problem that you experience. It will be best to open a new support ticket and send us some screenshots or video where we can observe the issue.

Kind regards,
Fiko
the Telerik team


Instantly find answers to your questions on the new Telerik Support Portal.
Check out the tips for optimizing your support resource searches.
0
Andrey
Top achievements
Rank 1
answered on 18 Mar 2009, 07:17 PM
Thanks a lot. Telerik has the best support.
Tags
Window
Asked by
Andrey
Top achievements
Rank 1
Answers by
Fiko
Telerik team
Andrey
Top achievements
Rank 1
Share this question
or