Link to home
Start Free TrialLog in
Avatar of Phoebe_Yi
Phoebe_Yi

asked on

Hide and Show applet

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?
ASKER CERTIFIED SOLUTION
Avatar of Mick Barry
Mick Barry
Flag of Australia image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Avatar of Phoebe_Yi
Phoebe_Yi

ASKER

Anyone know how to hide and show an applet when there are incoming msgs, assume the applet is an chat applet.
you can just show/hide the applet panel using setVisible()
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.
SOLUTION
Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
I think, setVisisble() method will work for you and u can call this method by javascript.
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?
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.
The code I've posted above does exactly this.
SOLUTION
Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial