3

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 tried tofront() method and setzindex in window also.)

I need to render like below:

Need like this image

  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>
vineth
  • 873
  • 5
  • 33
  • 57
  • @vineth: *"Thank For Your Time"* Please cut down the noise by leaving 'thanks' out of a question. Thanks is well expressed by up-voting answers, and **marking answers correct** (which you should probably be doing more of). – Andrew Thompson Jul 13 '11 at 16:05
  • @Andrew Thompson..if the right answer is provided it will be mark as right one definitely , the thanks is said for reading my query ok .. – vineth Jul 13 '11 at 18:21
  • @amol, thanks for u reply, i have added the screen shot for easy understanding . – vineth Jul 13 '11 at 21:02
  • Maybe the following approach will work - embed the applet in a ExtJS window and then make this window the parent of your "popup window" – Amol Katdare Jul 13 '11 at 23:04
  • @amol,i tried its not coming amol ,applet is taking the front position, i tried using renderTo property ..popup window is rendering below the applet only. – vineth Jul 14 '11 at 08:24
  • post real screenshots of what is happening and your modified code – Amol Katdare Jul 14 '11 at 16:00
  • @amol..i think there is no perfect solution for it, so Finally i integrate with jquery http://jqueryui.com/demos/droppable/ ...now its working in firefox alone..i rendered the grid in dragabble div. but its not looks good. – vineth Jul 27 '11 at 08:22

1 Answers1

0

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.

sbgoran
  • 3,451
  • 2
  • 19
  • 30