Solved

call method in Applet from another jsp page

Posted on 2001-06-14
3
586 Views
Last Modified: 2006-11-17
Hi,
   my Applet, lets call it A is embeded in the test.html.
   when user invoke the b() method in the A, the browser will open up a new browser screen with a jsp page.
   After certain processes, user will close the jsp page. As soon as the user close the browser window, I need to pass a value to the A which is embeded test.html in another browser window.
   I know we can call a method in applet using javascript. but my problem is the applet and the jsp page is on different browser window.
   Could anyone pls help me on this?
0
Comment
Question by:mkngau
[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 Comments
 

Accepted Solution

by:
jmarcus earned 100 total points
ID: 6194059
Hi mkngau,

I suppose, you are using the <applet> tag in the test.html. Now your requirement is,  to call a method in the applet from  a jsp page, which was opened from the applet.

If the second page was opened using a window.open in the first page, we can call a method in the applet in the parent page using,

opener.document.applets[0].method1(). // where method1() is the name of the method and your applet is the first applet in                                                                //  the page.
Now the problem is that, you may not be using the window.open to open the new page. Only if you do this, you can get a handle to the parent page using opener.

From the applet, you can call window.open using the LiveConnect package. Basically, you can call any Javascript methods from applets using LiveConnect. Further, LiveConnect is supported by both Netscape and IE.

You can get more info about LiveConnect from developer.netscape.com.

Hope this helps,

Jacob
0
 

Author Comment

by:mkngau
ID: 6194370
Hi, I have test the method. But it only works in Netscape but not ie.

the error message I get is
netscape.javascript.JSException

how can i make it works for both ie and netscape?
0
 
LVL 1

Expert Comment

by:Moondancer
ID: 6950826
ADMINISTRATION WILL BE CONTACTING YOU SHORTLY.  Moderators Computer101 or Netminder will return to finalize these if still open in seven days.  Please post closing recommendations before that time.

Question(s) below appears to have been abandoned. Your options are:
 
1. Accept a Comment As Answer (use the button next to the Expert's name).
2. Close the question if the information was not useful to you, but may help others. You must tell the participants why you wish to do this, and allow for Expert response.  This choice will include a refund to you, and will move this question to our PAQ (Previously Asked Question) database.  If you found information outside this question thread, please add it.
3. Ask Community Support to help split points between participating experts, or just comment here with details and we'll respond with the process.
4. Delete the question (if it has no potential value for others).
   --> Post comments for expert of your intention to delete and why
   --> YOU CANNOT DELETE A QUESTION with comments; special handling by a Moderator is required.

For special handling needs, please post a zero point question in the link below and include the URL (question QID/link) that it regards with details.
http://www.experts-exchange.com/jsp/qList.jsp?ta=commspt
 
Please click this link for Help Desk, Guidelines/Member Agreement and the Question/Answer process.  http://www.experts-exchange.com/jsp/cmtyHelpDesk.jsp

Click you Member Profile to view your question history and please keep them updated. If you are a KnowledgePro user, use the Power Search option to find them.  

Questions which are LOCKED with a Proposed Answer but do not help you, should be rejected with comments added.  When you grade the question less than an A, please comment as to why.  This helps all involved, as well as others who may access this item in the future.  PLEASE DO NOT AWARD POINTS TO ME.

To view your open questions, please click the following link(s) and keep them all current with updates.
http://www.experts-exchange.com/questions/Q.20100155.html
http://www.experts-exchange.com/questions/Q.20135949.html
http://www.experts-exchange.com/questions/Q.20169242.html
http://www.experts-exchange.com/questions/Q.20191005.html


To view your locked questions, please click the following link(s) and evaluate the proposed answer.
http://www.experts-exchange.com/questions/Q.20194194.html

*****  E X P E R T S    P L E A S E  ******  Leave your closing recommendations if this item remains inactive another seven (7) days.  If you are interested in the cleanup effort, please click this link http://www.experts-exchange.com/jsp/qManageQuestion.jsp?ta=commspt&qid=20274643 
POINTS FOR EXPERTS awaiting comments are listed here -> http://www.experts-exchange.com/commspt/Q.20277028.html
 
Moderators will finalize this question if in @7 days Asker has not responded.  This will be moved to the PAQ (Previously Asked Questions) at zero points, deleted or awarded.
 
Thank you everyone.
 
Moondancer
Moderator @ Experts Exchange
0

Featured Post

On Demand Webinar - Networking for the Cloud Era

This webinar discusses:
-Common barriers companies experience when moving to the cloud
-How SD-WAN changes the way we look at networks
-Best practices customers should employ moving forward with cloud migration
-What happens behind the scenes of SteelConnect’s one-click button

Question has a verified solution.

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

Suggested Solutions

Title # Comments Views Activity
Open dialog with server side controls in it 3 47
Fix Form size HTML 16 31
Html split(text) Part2 6 25
javascript form - error when hitting enter 3 28
The task A number given should be formatted for easy reading by separating digits into triads. Format must be made inline via JavaScript, i.e., frameworks / functions are not welcome. So let’s take a number like this “12345678.91¿ and format i…
This article demonstrates how to create a simple responsive confirmation dialog with Ok and Cancel buttons using HTML, CSS, jQuery and Promises
The viewer will learn the basics of jQuery, including how to invoke it on a web page. Reference your jQuery libraries: (CODE) Include your new external js/jQuery file: (CODE) Write your first lines of code to setup your site for jQuery.: (CODE)
The viewer will learn the basics of jQuery including how to code hide show and toggles. Reference your jQuery libraries: (CODE) Include your new external js/jQuery file: (CODE) Write your first lines of code to setup your site for jQuery…

730 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