cancel
Showing results for 
Search instead for 
Did you mean: 

Hiding an iGrid

Former Member
0 Kudos

Hi!

In a HTML file, I have a <table> object which contains an iGrid. When the users click on a button, I'd like to change the “style.diplay” of the <table> from "none" to "inline".

If the table contains only text box it works but as soon as I've had my iGrid in the table, when I'm trying to change the “style.diplay” property, IE turn comes in non responding status. With the iGrid in the <table>, I still can change “style.display” from “inline” to “none” but not the opposite. Looks like the applet doesn’t like to be hidden.

Any idea?

Accepted Solutions (0)

Answers (4)

Answers (4)

abesh
Contributor
0 Kudos

Hi Marie,

Use a Div ?

<table>
<tr>
<td>
<div style="display: none" id="mydiv1" name="mydiv1">
<!-- Your applet Here-->
</div>
</div>	
</td>
</tr>
</table>

then use :

function showDiv(){
mydiv1.style.display = "";
}

I tried it and it works !

Former Member
0 Kudos

Yes, you are right, a div or an iFrame works.

The problem is that you can't do "document.grid.updategrid(true)" when the grid is hidden. IE stops responding.

So I'm showing the grid and then update it.

thanks!

jamie_cawley
Advisor
Advisor
0 Kudos

As noted by Alin, hiding an applet can be issue prone and the recommended approach is to use an iframe. Placing an applet in a "div" is also not recommended. Please refer to the <a href="https://www.sdn.sap.comhttp://www.sdn.sap.comhttp://www.sdn.sap.com/irj/servlet/prt/portal/prtroot/com.sap.km.cm.docs/library/xapps/xmii/sap%20xmii%20best%20practices%20guide.pdf">xMII Best Practices</a> for more information.

Former Member
0 Kudos

Marie,

This is not a best practices recommendation to hide and unhide applets due to the fact that they will not refresh most of the time.

I have tried this previously in the past without any success. The problem arises from the applet needing to "repaint" the visual aspect of the contents which it doesn't do. This could be an IE or Java issue or something else.

What i have done in in the past is to have this applet by itself in a page which then gets linked through an iFrame on the main page. You can set this up easily so that that whenever that iFrame is made visible then it opens the page with the applet and thus the applets refreshes.

Give this a try and see if it works.

Former Member
0 Kudos

You can try to set the initial style of the iGrid applet as hidden. something like

<APPLET NAME="<name>" WIDTH="<width>" HEIGHT="<height>" CODE="iGrid.class" CODEBASE="/Illuminator/Classes/" ARCHIVE="illum8.zip" MAYSCRIPT STYLE="Visibility:Hidden">

And after the button click you could do a -

document.<applet name>.style.visibility="visible"

It should work.

Former Member
0 Kudos

Marie-Helene Bouchard ,

Just try to set applet's width and height to "1" using JavaScript.

When I did a search in www.w3schools.com on applet, it showed that applets width and height properties are available to access from JavaScript.

Thanks,

Srinivas.