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

RadWindow - Focus

0 Answers 77 Views
Window
This is a migrated thread and some comments may be shown as answers.
Bader
Top achievements
Rank 1
Bader asked on 23 Aug 2011, 07:46 AM
Hello,

I have a problem in focusing on the radwindow control.
I'm trying to show to focus on radwindow control using a content page (Not master page) where no body tag exists. So how can I focus on radwindow control? Is there any way to access the masterpage body tag in order to use the onload attribute?

Very Important: The hierarchy is:     BaseMasterPage (Has the body tag) => DefaultMasterPage => ForgottenPassword Page, In other words, I have to access the body tag of the Master of Master Page .

Here is my content page:
<%@ Page Title="" Language="C#" MasterPageFile="~/RL/MasterPages/DefaultMasterPage.master" AutoEventWireup="true" CodeFile="ForgottenPassword.aspx.cs" Inherits="GuidesNS.RL_Pages_ForgottenPassword" %>
  
<asp:Content ID="Content1" ContentPlaceHolderID="head" Runat="Server">
   <script type="text/javascript">
       function FocusOnRadWindow() {
           window.setTimeout(function () {
               GetRadWindow().GetContentFrame().contentWindow.focus();
           }, 100);
       }
   </script>
</asp:Content>
  
<asp:Content ID="Content4" ContentPlaceHolderID="ContentPlaceHolder1" Runat="Server">
    <!-- Page Controls -->
</asp:Content>

In case i'm using a aspx page which is not a content page of master page, then I can access the onload attribute of the "body" tag directly:

<body onload="FocusOnRadWindow()">
  <form  id="form1" runat="server">
    <div>
  
    </div>
  </form>
</body>


Please, I need your help,
It is very appreciated to send me the modified code.

Regards,
Bader

No answers yet. Maybe you can help?

Tags
Window
Asked by
Bader
Top achievements
Rank 1
Share this question
or