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

Caption/title disappearing in non-IE browsers

4 Answers 245 Views
Window
This is a migrated thread and some comments may be shown as answers.
topry
Top achievements
Rank 1
topry asked on 26 May 2009, 08:56 PM

I've tested under IE6, 7, 8, without issues.
However under current Windows releases of Chrome and Safari, the radWindow title appears for a moment when the window is created and then immediately disappears after the passed form is loaded.

The simplest example:

var wnd = radopen("MyDialog.aspx?", null);  
wnd.set_title("My RadWindow Caption");  
 
I've also tested with RadWindow using:
var oWnd = $find("<%= RadWindow1.ClientID %>");  
oWnd.set_title("My Dialog Title"); 

with same results.
However, if I pass a URL (http://www.telerik.com) vs a relative webform, the caption is not cleared.

4 Answers, 1 is accepted

Sort by
0
Accepted
Fiko
Telerik team
answered on 29 May 2009, 01:39 PM
Hello Topry,

This behavior is expected - RadWindow will automatically pick the title of the content page if it is from the same domain as the parent page. You can override that behavior by using one of the following approaches :
  • set the title in the page load event of the RadWindow as follows :
    <script type="text/javascript"
        function windowLoad(oWindow, args) 
        { 
            oWindow.set_title("New title"); 
        } 
        function openWindow() 
        { 
            var oWindow = radopen("Popup.aspx""RadWindow1"); 
            oWindow.remove_pageLoad(windowLoad); 
            oWindow.add_pageLoad(windowLoad); 
        } 
    </script> 
  • set the desired value between the <title> tag on the content page. That value will be used as a value of the RadWindow's title


I hope this helps.

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
topry
Top achievements
Rank 1
answered on 29 May 2009, 06:46 PM
Thanks, that resolves it for me - I must have missed it in the docs.
0
Karen
Top achievements
Rank 1
answered on 09 Oct 2009, 01:06 PM
Hello, your approach works if the title is static, but what if the title is passed to openWindow(title) method? How to forward it to windowLoad method?

Thanks.
 
0
Karen
Top achievements
Rank 1
answered on 09 Oct 2009, 01:14 PM
Never mind I found a solution

<script type="text/javascript"
    function windowLoad(oWindow, args) { 
        oWindow.set_title(oWindow.argument); 
    } 
    function openWindow(title) { 
        var oWindow = radopen("Popup.aspx""RadWindow1"); 
        oWindow.argument = title; 
        oWindow.remove_pageLoad(windowLoad); 
        oWindow.add_pageLoad(windowLoad); 
    }  
</script>  

Tags
Window
Asked by
topry
Top achievements
Rank 1
Answers by
Fiko
Telerik team
topry
Top achievements
Rank 1
Karen
Top achievements
Rank 1
Share this question
or