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

RadWindow hidden by Java applet

5 Answers 54 Views
Window
This is a migrated thread and some comments may be shown as answers.
Roger
Top achievements
Rank 1
Roger asked on 13 Dec 2012, 01:11 PM
Hi All,

I am trying to implement within an Image Viewing application which has a RadWindow which opens up on the click of a button.  The idea is that the user can copy information from the image into some fields on the Window.

The main window is a div which contains two other divs - a left "sidebar" panel and a right "viewer" panel
<div id="container">
        <asp:Panel ID="sidebar" runat="server">
           <asp:PlaceHolder ID="phSideBar" runat="server"></asp:PlaceHolder>
        </asp:Panel>
        <asp:Panel ID="viewer" runat="server">
            <asp:PlaceHolder ID="phViewer" runat="server"></asp:PlaceHolder>
        </asp:Panel>
    </div>

The sidebar contains navigation buttons and links and the viewer panel contains a java applet which handles the image viewing.

During page load, the user controls are added to the placeholders.
protected void Page_Load(object sender, EventArgs e)
{    
            System.Web.UI.Control contHardCopyOrdering = (System.Web.UI.Control)LoadControl("vwHardCopy.ascx");
            sidebar.Controls.Add(contHardCopyOrdering);      // Add Order button Control to SideBar  phSideBar
 
            ViewerServerControl imgViewer = new ViewerServerControl();
            viewer.Controls.Add(imgViewer);   // Add viewer to Placeholder
}

The ascx "vwHardCopy" is

<%@ Control Language="C#" AutoEventWireup="true" CodeBehind="vwHardCopy.ascx.cs"
    Inherits="OriginsNetwork.ImageViewer.vwHardCopy" %>
<%@ Register TagPrefix="telerik" Assembly="Telerik.Web.UI" Namespace="Telerik.Web.UI" %>
 
<telerik:RadWindowManager ID="RadWindowManager1" ShowContentDuringLoad="false" VisibleStatusbar="false"
    ReloadOnShow="true" runat="server" EnableShadow="true" Width="1500px" Height="500px">
    <Windows>
        <telerik:RadWindow runat="server" ID="RadWindow_NavigateUrl" NavigateUrl="Dialog.aspx"
        Modal="false" Width="300px" Height="250px" Left="0px" Title = "Title of Window">
     </telerik:RadWindow>     
    </Windows>
</telerik:RadWindowManager>
<div id="hardcopy" style="margin-top: 30px;">
<asp:ImageButton ID="btnDialog" ImageUrl "/images/buttons/order-original-red.gif" OnClientClick = "openWinNavigateUrl(); return false;" runat="server"></asp:ImageButton>  
<script type="text/javascript">
            function openWinNavigateUrl() {
                $find("<%=RadWindow_NavigateUrl.ClientID %>").show();
            }
</script>
</div>

the Window is shown but in FireFox, it is behind the Viewer and in IE8 is doesnt get shown at all and seems to do a postback.  I havent tested it with IE9 yet.

Can anyone point me in the right direction to try to debug this or see what is going on.

Thanks for looking
Roger

5 Answers, 1 is accepted

Sort by
0
Marin Bratanov
Telerik team
answered on 13 Dec 2012, 02:40 PM
Hello Roger,

RadWindow is an absolutely positioned element with a default z-index of 3000, so other elements with special positioning can go above it if they have higher z-indexes. A list with the default values is available here: http://www.telerik.com/help/aspnet-ajax/controlling-absolute-positioning-with-zindex.html. It also shows how you can change it. If you need to use the manager you should set the new value for the manager rather than for the given RadWindow. In this case, however, the manager may not be needed, unless you need to create dynamic RadWindow instances.

In case you are using some flash/silverlight objects on the page in your image viewer the RadWindow would be displayed behind them. More in that is available in the following KB: http://www.telerik.com/support/kb/aspnet-ajax/window/control-is-shown-behind-a-heavy-weight-object-pdf-flash-activex-etc.aspx. Put simply, setting Overlay=true is the way to get around this.

On IE8 - the most likely reason for the RadWindow not to show is some JavaScript error on the page, so I suggst you turn on script debuggint and error notifications in the browser and make sure your page is clear.


Regards,
Marin Bratanov
the Telerik team
If you want to get updates on new releases, tips and tricks and sneak peeks at our product labs directly from the developers working on the RadControls for ASP.NET AJAX, subscribe to their blog feed now.
0
Roger
Top achievements
Rank 1
answered on 14 Dec 2012, 03:51 PM
Hi Martin,

Thanks for coming back to me with some suggestions.
Using Overlay=true on the Window declaration seems to solve the issue.

Ref: the IE8 problem - I have turned on debugging and can see that the $find("ct104_RadWindow_NavigateURL").show() fails with null or not an object.

Firefox is fine - any further suggestions. 

Roger
0
Marin Bratanov
Telerik team
answered on 17 Dec 2012, 03:05 PM
Hi Roger,

I am glad to hear the overlay worked for you.

On the IE8 error - this is a really strange report. The fact that it works with other browsers indicates that the object is there and is with this ID. What I can suggest is trying a small timeout (even 0ms may be enough, but you can start higher). You can also get the reference in a variable and check that it is not null before calling show() to at least avoid the error. Then, if a small timeout is not enough, you can add a setInverval call that will get the reference again every 50ms (for example). Another setTimeout can break the interval after several seconds of failure to prevent the page from consuming resources on the client machine. Of course, a successful reference should also break the interval.


All the best,
Marin Bratanov
the Telerik team
If you want to get updates on new releases, tips and tricks and sneak peeks at our product labs directly from the developers working on the RadControls for ASP.NET AJAX, subscribe to their blog feed now.
0
Roger
Top achievements
Rank 1
answered on 17 Dec 2012, 05:27 PM
Hi Martin,
I have now researched a llittle more into this issue and it is ONLY IE8 which gives me the problem but ONLY if I load the java viewing applet which is the ViewONE  pro applet from Daeja - www.daeja.com
If I run the test page with no java viewer loaded then IE8 works as it should - load the applet and the $find fails.

Other browsers tested OK are FireFox, Google Chrome, Safari, IE9.

I tried the getInterval workaround you suggested, but this simply looped around always returning a null value - so it doesnt seem to be a timing issue.

I'm fast running out of ideas - help please!
Roger
0
Marin Bratanov
Telerik team
answered on 19 Dec 2012, 01:54 PM
Hello Roger,

The $find() method is a generic method from the MS AJAX framework and we do no influence it. I am afraid I cannot say why the applet prevents its functionality under IE8. What I can advise is contacting their support personnel on why do they break the MS AJAX functions under IE8.

On this end I can suggest using the RadWindowManager API to get a reference to this RadWindow - see its getWindowByName(serverID) method: http://www.telerik.com/help/aspnet-ajax/window-programming-radwindowmanager-methods.html. The GetRadWindowManager() global method can be used to obtain a reference to the first manager on the page. You can also try the basic approach the $find() encapsulates - document.getElementById("RadWindowClientIDgoesHere").control.


All the best,
Marin Bratanov
the Telerik team
If you want to get updates on new releases, tips and tricks and sneak peeks at our product labs directly from the developers working on the RadControls for ASP.NET AJAX, subscribe to their blog feed now.
Tags
Window
Asked by
Roger
Top achievements
Rank 1
Answers by
Marin Bratanov
Telerik team
Roger
Top achievements
Rank 1
Share this question
or