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

[Solved] What controls whether an iframe is used?

4 Answers 126 Views
Window
This is a migrated thread and some comments may be shown as answers.
This question is locked. New answers and comments are not allowed.
Marc Simkin
Top achievements
Rank 2
Iron
Iron
Veteran
Marc Simkin asked on 13 Jul 2011, 09:31 PM
What controls whether the window being created by $.telerik.window.create is in an iframe of a div? I know that if I set modal = true, I get an iframe, and if I set modal = false I get a div.

I would like to create a modeless window for my application, but this window always needs to be available and not tied to a specific div on a specific page. The purpose of this window is an in application chat client.  Since this is a chat window, it is expect that the user would still be navigating around to other pages included in the application.

I was hoping to just create the window purely on the client side upon the click of a link.

thanks

marc

4 Answers, 1 is accepted

Sort by
0
Alex Gyoshev
Telerik team
answered on 14 Jul 2011, 08:11 AM
Hello Marc Simkin,

The iframe is rendered when the contentUrl property is set to a remote URL (on a different server). It is not affected by the modal property.

Kind regards,
Alex Gyoshev
the Telerik team

Register for the Q2 2011 What's New Webinar Week. Mark your calendar for the week starting July 18th and book your seat for a walk through of all the exciting stuff we will ship with the new release!

0
Marc Simkin
Top achievements
Rank 2
Iron
Iron
Veteran
answered on 14 Jul 2011, 08:30 AM
If you look at the attached example.  Both the main page and the window are loaded from the same remote server.

The window has been created in an iFrame.

Are windows that are created via the client API always in an iFrame?

(Please ignore the errors in the close Window function).

Thanks

Marc
0
Accepted
Alex Gyoshev
Telerik team
answered on 15 Jul 2011, 06:52 AM
Hi Marc Simkin,

Well, the "algorithm" for determining whether the URL is remote isn't that smart -- it just looks whether a protocol is set. this.href returns the full URL, thus causes the iframe to be shown. If you use showDialogWindow(this.getAttribute('href', 2)); instead, you'll get the proper behavior (i.e. no iframe). Please note, that when you're not using an iframe, you need to load a partial view.

Best wishes,
Alex Gyoshev
the Telerik team

Register for the Q2 2011 What's New Webinar Week. Mark your calendar for the week starting July 18th and book your seat for a walk through of all the exciting stuff we will ship with the new release!

0
Marc Simkin
Top achievements
Rank 2
Iron
Iron
Veteran
answered on 15 Jul 2011, 01:57 PM
Thank you for that info.
Tags
Window
Asked by
Marc Simkin
Top achievements
Rank 2
Iron
Iron
Veteran
Answers by
Alex Gyoshev
Telerik team
Marc Simkin
Top achievements
Rank 2
Iron
Iron
Veteran
Share this question
or