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
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
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.
> 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
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
I think, setVisisble() method will work for you and u can call this method by javascript.
ASKER
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?
ASKER
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.
you'll need to call javascript to hide a div
http://www.rgagnon.com/javadetails/java-0172.html
http://www.codeproject.com/java/javaappletwaitmsg.asp
http://www.rgagnon.com/javadetails/java-0172.html
http://www.codeproject.com/java/javaappletwaitmsg.asp
The code I've posted above does exactly this.
SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
ASKER