on 07-20-2007 9:17 PM
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 doesnt like to be hidden.
Any idea?
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 !
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
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.
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.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
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.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
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.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
10 | |
5 | |
1 | |
1 | |
1 | |
1 | |
1 | |
1 | |
1 | |
1 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.