Want to win a PS4? Go Premium and enter to win our High-Tech Treats giveaway. Enter to Win

x
?
Solved

Hide and Show applet

Posted on 2006-07-03
14
Medium Priority
?
583 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
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 3
  • 3
  • 2
  • +2
14 Comments
 
LVL 92

Accepted Solution

by:
objects earned 172 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
What does it mean to be "Always On"?

Is your cloud always on? With an Always On cloud you won't have to worry about downtime for maintenance or software application code updates, ensuring that your bottom line isn't affected.

 
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 164 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
 
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 164 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

Concerto's Cloud Advisory Services

Want to avoid the missteps to gaining all the benefits of the cloud? Learn more about the different assessment options from our Cloud Advisory team.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

This was posted to the Netbeans forum a Feb, 2010 and I also sent it to Verisign. Who didn't help much in my struggles to get my application signed. ------------------------- Start The idea here is to target your cell phones with the correct…
In this post we will learn how to make Android Gesture Tutorial and give different functionality whenever a user Touch or Scroll android screen.
This tutorial covers a practical example of lazy loading technique and early loading technique in a Singleton Design Pattern.
This video teaches viewers about errors in exception handling.
Suggested Courses

609 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