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

how to load content url into raddock?

4 Answers 166 Views
Dock
This is a migrated thread and some comments may be shown as answers.
heriyanto binduni
Top achievements
Rank 1
heriyanto binduni asked on 28 Dec 2009, 06:53 PM
hi, i know we can load content url from any web page into radwindow using NavigateUrl properties.
but how do i perform the same thing using raddock?

tia

4 Answers, 1 is accepted

Sort by
0
Accepted
Princy
Top achievements
Rank 2
answered on 29 Dec 2009, 06:37 AM
Hi Heriyanto,

You can add an iframe with the required url into your RadDock as shown below:
aspx:
<telerik:RadDock ID="RadDock1" runat="server"
     <ContentTemplate> 
         <iframe id="frame" runat="server" src="http://www.google.com"></iframe> 
     </ContentTemplate> 
</telerik:RadDock>  

Hope this helps..
Princy.
0
heriyanto binduni
Top achievements
Rank 1
answered on 29 Dec 2009, 11:33 AM
tq princy, it work very good ^_^
0
Accepted
apb
Top achievements
Rank 1
answered on 30 Dec 2009, 01:52 AM
If you want your iframe to auto size, you'll need something like this in your page:

    <script type="text/javascript">  
        var is_chrome = /chrome/.test(navigator.userAgent.toLowerCase());  
        function sizeHostFrame(target) {  
            var frame = $('#' + target.id);  
            var innerDoc = (frame.get(0).contentDocument) ? frame.get(0).contentDocument : frame.get(0).contentWindow.document;  
            var contentHeight = is_chrome ? innerDoc.body.offsetHeight : innerDoc.body.scrollHeight;  
            frame.height(contentHeight);  
        }  
    </script>  
 

then do something like this with your iframe tag:

<iframe onload="sizeHostFrame(this);" src="whatever" scrolling="no" height="75px" frameborder="0" style="width: 100%; padding: 0px; margin: 0px; border: none;"></iframe> 

0
heriyanto binduni
Top achievements
Rank 1
answered on 30 Dec 2009, 08:18 AM
tq, i will try this one too
Tags
Dock
Asked by
heriyanto binduni
Top achievements
Rank 1
Answers by
Princy
Top achievements
Rank 2
heriyanto binduni
Top achievements
Rank 1
apb
Top achievements
Rank 1
Share this question
or