Solved

Hide and Show applet

Posted on 2006-07-03
14
567 Views
Last Modified: 2009-12-16
May I know is there any method to hide and show an applet in JSP? by using Javascript or any other method to achieve this?
0
Comment
Question by:Phoebe_Yi
  • 3
  • 3
  • 2
  • +2
14 Comments
 
LVL 92

Accepted Solution

by:
objects earned 43 total points
ID: 17034906
obvious method would bt reload the page iwth/without the applet tag.

Javascript you should be able to do similiar, haven't tried it in practice though.
0
 

Author Comment

by:Phoebe_Yi
ID: 17035172
Anyone know how to hide and show an applet when there are incoming msgs, assume the applet is an chat applet.
0
 
LVL 92

Expert Comment

by:objects
ID: 17035181
you can just show/hide the applet panel using setVisible()
0
 
LVL 35

Expert Comment

by:girionis
ID: 17035234
Phoebe_Yi,

> Anyone know how to hide and show an applet when there are incoming
> msgs, assume the applet is an chat applet.

You could use a <div> tag and show hide the applet code. This solution is similar to dynamically showing/hiding text, although I am not sure if this will work in applets, since the applet tag will be there and therefore it will be loaded. Give it a try and see if it works.
0
 
LVL 8

Assisted Solution

by:colr__
colr__ earned 41 total points
ID: 17035508
Use this, wrap the applet tag in a div:

<div id="theApplet" style="visibility:hidden;">
<applet></applet>
</div>

And use the following javascript to hide/show it:

function hideApplet(){
document.getElementByID("therApplet").style.visibility = "show";
}

function showApplet(){
document.getElementByID("therApplet").style.visibility = "hidden";
}
0
Threat Intelligence Starter Resources

Integrating threat intelligence can be challenging, and not all companies are ready. These resources can help you build awareness and prepare for defense.

 
LVL 26

Expert Comment

by:ksivananth
ID: 17040636
I think, setVisisble() method will work for you and u can call this method by javascript.
0
 

Author Comment

by:Phoebe_Yi
ID: 17040802
if I want to hide/show the div when there is new incoming msg which is controlled by the applet. how can i access it?
0
 

Author Comment

by:Phoebe_Yi
ID: 17040809
let me explain in detail. let say I have a div and applet in jsp. the visibility of the div is controlled by the applet. When there is new incoming msg, the applet need change the visibility of the div to visible.
0
 
LVL 92

Expert Comment

by:objects
ID: 17040902
0
 
LVL 8

Expert Comment

by:colr__
ID: 17041074
The code I've posted above does exactly this.
0
 
LVL 35

Assisted Solution

by:girionis
girionis earned 41 total points
ID: 17041223
> if I want to hide/show the div when there is new incoming msg which is controlled by the applet. how can i access it?

http://www.codestore.net/store.nsf/unid/DOMM-4UTFCP?OpenDocument
http://www.apl.jhu.edu/~hall/java/JavaScript-from-Java.html
http://www.modernminds.com/Info/UBB2/Doc/JSFromApplet.html
0

Featured Post

IT, Stop Being Called Into Every Meeting

Highfive is so simple that setting up every meeting room takes just minutes and every employee will be able to start or join a call from any room with ease. Never be called into a meeting just to get it started again. This is how video conferencing should work!

Join & Write a Comment

Suggested Solutions

Introduction This article is the first of three articles that explain why and how the Experts Exchange QA Team does test automation for our web site. This article explains our test automation goals. Then rationale is given for the tools we use to a…
In this post we will learn how to connect and configure Android Device (Smartphone etc.) with Android Studio. After that we will run a simple Hello World Program.
Viewers learn about the third conditional statement “else if” and use it in an example program. Then additional information about conditional statements is provided, covering the topic thoroughly. Viewers learn about the third conditional statement …
Viewers will learn about arithmetic and Boolean expressions in Java and the logical operators used to create Boolean expressions. We will cover the symbols used for arithmetic expressions and define each logical operator and how to use them in Boole…

706 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

18 Experts available now in Live!

Get 1:1 Help Now