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

RadAjaxLoadingPanel behind java applet

1 Answer 43 Views
Ajax
This is a migrated thread and some comments may be shown as answers.
Marcel
Top achievements
Rank 1
Marcel asked on 20 Jul 2012, 08:06 AM
Hello everybody,
i'd like to show a RadAjaxLoadingPanel (called via JS) over an java applet.
Unfortunately, the applet hides the LoadingPanel.
I tried to change the z-index but, it doesn't work.

For other controls in this case there is the overlay-property but the RadAjaxLoadingPanel doesn't support it.
Is there any way to show the RadAjaxLoadingPanel over an java applet?

Best Regards,
Marcel

1 Answer, 1 is accepted

Sort by
0
Galin
Telerik team
answered on 25 Jul 2012, 08:05 AM
Hi Marcel,


To show a regular element or RadAjaxLoadingPanel above a Java Applet you should set background-color to this element. Also for IE browser you should create an <iframe /> element. It have to be placed above the Applet and in this case it is possible to show other elements above it.

Check out the following example
<%@ Page Language="C#" AutoEventWireup="true" %>
 
<%@ Register Assembly="Telerik.Web.UI" Namespace="Telerik.Web.UI" TagPrefix="telerik" %>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<head id="Head1" runat="server">
    <title>TestPage</title>
    <style type="text/css">
        .RadAjax
        {
            background-color: white;
        }
    </style>
    <telerik:RadCodeBlock runat="server">
        <script type="text/javascript">
            function pageLoad() {
                currentLoadingPanel = $find("<%= RadAjaxLoadingPanel1.ClientID%>");
                currentUpdatedControl = "applet";
                currentLoadingPanel.show(currentUpdatedControl);
                var iframe = $get("iframe");
                var showedPanel = $get(currentLoadingPanel.get_id() + currentUpdatedControl);
                iframe.style.top = showedPanel.style.top;
                iframe.style.left = showedPanel.style.left;
            }
     
        </script>
    </telerik:RadCodeBlock>
</head>
<body>
    <form id="form1" runat="server">
    <telerik:RadScriptManager ID="scriptManager" runat="server">
    </telerik:RadScriptManager>
    <telerik:RadAjaxLoadingPanel ID="RadAjaxLoadingPanel1" Skin="Forest" runat="server" />
    <h1>
        Java Test</h1>
    <hr />
    <applet code="ArcTest.class" width="400" height="400" id="applet">
        alt="Your browser understands the <APPLET> tag but isn't running the applet,
        for some reason." Your browser is completely ignoring the <APPLET> tag!
    </applet>
    <iframe id="iframe" scrolling="no" frameborder="0" src="javascript:'<html></html>';"
        style="position: fixed; width: 400px; height: 400px; left: 0; top: 0; z-index: 3011;"
        tabindex="-1"></iframe>
    <script type="text/javascript" src="http://java.sun.com/js/omi/jsc/s_code_remote.js"></script>
    </form>
</body>
</html>


This is how the overlay property works in other RadControls.

I hope this helps.


Greetings,
Galin
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
Ajax
Asked by
Marcel
Top achievements
Rank 1
Answers by
Galin
Telerik team
Share this question
or