开发者

Bring Extjs window in front of Applet (JApplet)

I am creating Java applet and extjs button inside JSP file body tag, When I click the button I am creating extjs window with float option.

Problem is:

  1. Button is rendered below the applet.
  2. Window is rendering under the applet(window is not coming front)

(I tri开发者_如何学编程ed tofront() method and setzindex in window also.)

I need to render like below:

Bring Extjs window in front of Applet (JApplet)

  1. Applet need to take entire body
  2. button need to be placed over the top center of the applet.
  3. Extjs window need to render in front(above) the applet.

How can I achieve the above scenario?

I added by code below:

<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1">
<link href="ext/resources/css/ext-all.css" rel="stylesheet" type="text/css" />
<script type="text/javascript" src="ext/adapter/ext/ext-base.js"></script>
<script type="text/javascript" src="ext/ext-all.js"></script>
<script language="javascript">

Ext.onReady(function() {


function CreateWindow()
{
    var win = new Ext.Window( {
                    layout : 'fit',
                     floating: true,                    

                     // resizable : false,
                    width : 500,
                    height : 120,                   
                    closeAction : 'close',
                    closable : true,
                    plain : true,
                    //items : [grid],       
                    });         

    win.show(); 
    //win.setZIndex('2');   
}

new Ext.Button({
    text: 'submit ExtJS',
    handler: function() {
        CreateWindow();
    },
    id: 'submit_button',
    renderTo:document.body
});
  });

</script>
<title>Insert title here</title>

</head>
<body>

    <applet archive="**.jar, mylib.jar" code="" height="250" width="98%" vspace = "20">
        <param name="schema" value="<%= request.getScheme() %>" />
        <param name="serverName" value="<%= request.getServerName() %>" />
        <param name="serverPort" value="<%= request.getServerPort() %>" />
        <param name="context" value="<%= request.getContextPath() %>" />
    </applet>

</body>
</html>


I'm afraid that there is no easy solution for this, it is not a problem with ExtJs or your code, it is just a way this beasts (flash, java applet, activeX) work :)

You can try out some of this solutions, I believe iframe solution will work but I never tried it, and for wmode parameter I think I tried that once and it didn't work out for me, but who knows maybe today browsers now supports it.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜