cancel
Showing results for 
Search instead for 
Did you mean: 

how to hide an applet

Former Member
0 Kudos

In my htm page, i am using an applet (iGrid). When i test my htm page, the grid is display at initial load of the page.

I want to hide the grid at initial load of the page, and once i click any of the button on the htm page, then only grid should be displayed.

how can i do this. Reply as soon as you can.

thanks,

Accepted Solutions (0)

Answers (2)

Answers (2)

Former Member
0 Kudos

Hi,

Simple way to hide applet ,just give style="visibility: hidden" in <applet> tag.

eg:

<applet name="ProdOrdOnHoldInsertCommand" codebase="/XMII/Classes" code="iCommand" archive="illum8.zip" width="1" height="1" mayscript style="visibility: hidden">

Regards,

Padma

Former Member
0 Kudos

I had a similiar requirement and to achieve this,I placed the applet inside a <Div></Div> and used the following javascript code

document.getElementById('Div Id').style.display="None"

during onLoad() to make the applet invisible and on onClick() of a button element,used the following javascript code to display,

document.getElementById('Div Id').style.display=" "

Hope this helps.

Ram

Former Member
0 Kudos

Hi

Ram,

Thanks for your reply, but it is not working.

This is the code for my applet, can you explain in more detail, how to use ur code and where to use.

<APPLET NAME="SelectOperator" WIDTH="700" HEIGHT="200" CODE="iGrid" CODEBASE="/XMII/Classes" ARCHIVE="illum8.zip" MAYSCRIPT>

<PARAM NAME="QueryTemplate" VALUE="Train01/Reports/JCOCallFlightGetListQuery">

<PARAM NAME="DisplayTemplate" VALUE="Train01/Common/iGrid">

</APPLET>

Former Member
0 Kudos

Hi,

document.getElementById('Div Id').style.display="None"

during onLoad() to make the applet invisible and on onClick() of a button element,used the following javascript code to display,

document.getElementById('Div Id').style.display="Inline"

make sure that the gird is placed seprately in the div.

for example:

<table>"code"</table>

<div id="divid">

<table> "code"</table>

</div>

this div can be hided.

Regards,

Kishoe

jcgood25
Active Contributor
0 Kudos

Apparently none of you are well versed in the MII best practices that discourage putting applets in divs and trying to hide and show them with js.

Former Member
0 Kudos

Jeremy,

sorry to jump in here, but your message made me look up the best practice guide again. There it is said:

"Do not place applets in a DIV tag with height and widths as a percentage; Rather define the height and widths as pixels or other measurement. When defined as percentage, the browser window size changes the DIV size which could interfere with the applet rendering correctly".

From your experience, are there problems if I use the display = none as described here? We are also using DIVs to dynamically show/hide grids depending on different selections, and I have interpreted the Guide in a way that only the use of percentage values is discouraged, but not hiding them entirely.

Michael

Former Member
0 Kudos

Any combination of "applets" and "best practices" might be considered an oxymoron by some, including the World Wide Consortium, but I won't go there

More importantly, maybe, I guess I never understood the appeal of playing with the visibility of applets or other html elements anyway. I do see it a lot. But according to one of the most renowned Human Computer Interaction experts, Dr. Donald Norman, this practice can lead to a confusing "mental model" for users, which is the exact opposite effect one should strive to achieve with screen simplification using MII or any other tool.

Gee, I guess some of my "fluffy" gen-ed course did pay off after all

jcgood25
Active Contributor
0 Kudos

Michael,

Historically (as per the support wire over the years) this had led to excessive JavaScript, inflated web pages, extraneous applets and unecessary background queries, body on load init type functions with applet dependencies, and 'please wait' webdynpro swirly bird icons, not to mention bizzare browser/JRE blinking and repainting issues.

Without seeing the specifics of the particular page you mentioned, we would typically recommend an iFrame approach to break up the page in a more modular approach. From a user interaction perspective this quite often leads to faster initial page loading (only the necessary applets in the main page), and then as users select particular functionality the iFrame irpt module page is loaded containing the desired applets and code. In my experiences people are more apt to be patient for pages and query related activity to finish as they press buttons requesting the desired data or functionality then they are if a multi-dimentional page takes a long time to load initially and they really only want a portion of the functionality. I prefer to put the control of the page into their hands and follow their lead, not trying to pre-load random future activity related items, especially when the page is intended to be ad-hoc.

Regards,

Jeremy