Split View Pane opens another web browser

1 Answer 115 Views
Splitter
Wei
Top achievements
Rank 1
Iron
Wei asked on 09 Dec 2022, 01:04 AM
We have a Python Flask app on another server that we would like to open in one of the panes in split view, is that possible?

1 Answer, 1 is accepted

Sort by
0
Stoyan
Telerik team
answered on 13 Dec 2022, 02:32 PM

Hello Wei,

Yes, you are able to open another web page in the Splitter. There are two available approaches:

Using an iframe

You can pass an iframe element and load the external web app in it

Content(@<div class="pane-content">
                            <h2>Iframe</h2>
                            <iframe width="1280" height="720" src="https://www.youtube.com/embed/c1nYF21FGS4" ></iframe>
                        </div>);

The advantage of the approach is that you can use a webpage within a webpage without to much additional configuration (except configuring its CORS policy appropriately).

The disadvantages are that some mobile device do not render iframes correctly, their browser support is limited and they are a resource intensive option for the client.

Loading content with AJAX

Alternatively, you can load the content from another server by sending an AJAX request and loading the response in the Splitter's pane:

 verticalPanes.Add()
              .Size("300px")
              .HtmlAttributes(new { id = "bottom-pane" })
              .LoadContentFrom("yourUrl");

This approach avoids the disadvantages of the iframe but instead requires you to configure the server to respond with the appropriate Html page.

For your convenience I am attaching a Telerik REPL that showcases the suggestions above.

Regards,
Stoyan
Progress Telerik

Virtual Classroom, the free self-paced technical training that gets you up to speed with Telerik and Kendo UI products quickly just got a fresh new look + new and improved content including a brand new Blazor course! Check it out at https://learn.telerik.com/.

Tags
Splitter
Asked by
Wei
Top achievements
Rank 1
Iron
Answers by
Stoyan
Telerik team
Share this question
or