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

RadWindow Steals IFrame

7 Answers 186 Views
Window
This is a migrated thread and some comments may be shown as answers.
Adam
Top achievements
Rank 1
Adam asked on 18 Jan 2008, 10:02 PM
I'm having an issue with a RadWindow showing itself in a IFrame in my page, instead of creating a new window.

By default, the window is not shown.  I have a dropdown on an update panel in my master page, and when a specific value is chosen, the RadWindow.VisibleOnPageLoad is set to true. 

On most pages, this work just fine.  However, on one of my pages I have an IFrame showing a document(pdf).  When the RadWindow is shown, it takes over (or at least attempts to depending on the browser) the IFrame, putting its content inside the IFrame instead of launching in its own window.

Is there a better way to launch the window programatically so it doesn't steal the IFrames in my content pages?

Thanks
Adam

7 Answers, 1 is accepted

Sort by
0
Georgi Tunev
Telerik team
answered on 21 Jan 2008, 02:31 PM
Hello Adam,

Can you please check the attached image and let me know if this is what you see in your application?
If this is so, RadWindow actually doesn't use the IFRAME on your page, but only the IFRAME of the RadWindow is showing over your one while the rest of the RadWindow (borders, toolbar, statusbar etc.) is rendered behind the PDF's IFRAME.
We are familiar with this problem and we will improve the behavior of the control for the Q1 release - we are planning to provide an additional property to be used in such scenarios. For the time being I would suggest to use the code below - you need to hook it to the RadWindow's OnClientPageLoad event.

function OnClientPageLoad(oWindow) 
   var tempBrowser = Sys.Browser.agent;     
   var tempVersion = Sys.Browser.version;     
   Sys.Browser.agent = Sys.Browser.InternetExplorer;     
   Sys.Browser.version = 6;                     
   oWindow.show();              
   Sys.Browser.agent = tempBrowser;     
   Sys.Browser.version = tempVersion;     
                    
                                
   var oContentFrame = oWindow.get_ContentFrame();     
   var oPopupElement = oWindow.get_PopupElement();   
   var iframe= oPopupElement.previousSibling;   
   iframe.style.pixelLeft = oPopupElement.offsetLeft;   
   iframe.style.pixelTop = oPopupElement.offsetTop;  


All the best,
Georgi Tunev
the Telerik team

Instantly find answers to your questions at the new Telerik Support Center
0
Adam
Top achievements
Rank 1
answered on 21 Jan 2008, 04:31 PM
That code snippet worked great. 

Most of the window shows up now (a bit of the border on the bottom still refuses to show).

One other issue I noticed: the pdf is still accessible even though the window is set to modal.  It works fine if the iframe is showing a webpage, so I'm guessing its a pdf plugin issue/incompatibility. 

Thanks for the help
Adam
0
Tervel
Telerik team
answered on 21 Jan 2008, 05:26 PM
Hello Adam,

Yes, the PDF plugin does not obey the HTML rules, and this is why the PDF document is still accessible. Unfortunately, it is not possible to override this behavior through HTML, as th PDF plugin is in fact a completely independent application running embedded in the browser.

All the best,
Tervel
the Telerik team

Instantly find answers to your questions at the new Telerik Support Center
0
Robert Vreeland
Top achievements
Rank 1
answered on 06 Oct 2008, 07:55 PM
was a property ever added for this situation?
0
Georgi Tunev
Telerik team
answered on 08 Oct 2008, 02:37 PM
Hi Robert,

Yes this code was added for the Overlay property.


Best wishes,
Georgi Tunev
the Telerik team

Check out Telerik Trainer, the state of the art learning tool for Telerik products.
0
Robert Vreeland
Top achievements
Rank 1
answered on 08 Oct 2008, 04:21 PM
Thanks. The reason I'm asking is that I am having a situation where I have a page with my own iframe on it to show a document in.

When I then use radconfirm, the radconfirm window appears to show BEHIND my iframe and is essentially invisible - sometimes I can see a small part of the top title.

I have tried changing the z-index on my iframe but am unable to resolve this.
0
Georgi Tunev
Telerik team
answered on 09 Oct 2008, 12:48 PM
Hi Robert Vreeland,

It is not possible to display something over the IFRAME - this is how the browser works. What I can suggest in your scenario however is to move the confirm dialog aside from the IFRAME by using the moveTo() method:

var oConfirm = radconfirm('sure?',callBackFn,350,250,null,'title');
oConfirm.moveTo(40,40);

I hope this helps.


Kind regards,
Georgi Tunev
the Telerik team

Check out Telerik Trainer, the state of the art learning tool for Telerik products.
Tags
Window
Asked by
Adam
Top achievements
Rank 1
Answers by
Georgi Tunev
Telerik team
Adam
Top achievements
Rank 1
Tervel
Telerik team
Robert Vreeland
Top achievements
Rank 1
Share this question
or