Solved

Java applet not working in Netscape (1200 pts)

Posted on 2002-03-26
5
238 Views
Last Modified: 2010-03-31
original thread: http://www.experts-exchange.com/jsp/qManageQuestion.jsp?ta=java&qid=20280502
This is a repost of the above thread which was getting stale. I'll restate the problem below:

I have spent numerous hours and hundreds of trials on this issue already. I simply cannot connect to
server through a Java applet, and I don't think it's because of domain restrictions or applet not being
signed. Here is the detail:

The following is an HTML page with a single link. When user clicks on the link, the javascript function
downloadData() is called.

downloadData() does the following:
- download some data from web server through an Java applet
- wait for data to return
- process data
- display data

I can get this to work in IE, but not Netscape 6.2 (Netscape only works under localhost). The HTML,
the applet and the servlet are all in the same domain and in the same directory, therefore it should
not have violated any applet securities.

Because of the complexity of the rest of the code, I need to solve this problem under strict conditions.
(i.e. I need an applet that can download data from the server and return the result while my JavaScript
code waits for it) Using callback functions is not an option here.

Because of the nature of this problem, I would only give points to workable solutions. For compensation,
I would award an extra 900 points on top of the 300 points to the right answer.

Thanks in advance.

----------------------
below is the HTML file:

<html>
<head><title>Test</title>
<SCRIPT language="JavaScript">
<!--
//-----------------------------------------
function doabc() {
 // do some set up here ...

 window.document.downloader.callURL('response.htm');
 var result = new String(window.document.downloader.result);
 alert('result = ' + result);

 // do some complex processing here ...
 // display result ...
}
-->
</SCRIPT>
</head>

<BODY>
<applet code="URLDownloader.class" height="1" width="1" id="downloader" name="downloader" VIEWASTEXT
MAYSCRIPT></applet>
<a href="javascript: doabc();">abc</a>
</BODY>
</html>
0
Comment
Question by:absong
  • 3
5 Comments
 
LVL 16

Accepted Solution

by:
heyhey_ earned 300 total points
Comment Utility
can you e-mail me all the files (.html, .java) so that I can  test the applet locally.

my e-mail is heyhey_@iname.com
0
 
LVL 3

Author Comment

by:absong
Comment Utility
heyhey, thanks
i will get that to you in about two hours.
0
 
LVL 3

Author Comment

by:absong
Comment Utility
heyhey,
just sent the file to you. hope it helps.
0
 
LVL 3

Expert Comment

by:shyamkumarreddy
Comment Utility
Hi absong.
I worked in Livescript. I could follow the discussion. Can you explain me ur probs in simple and what u want to do.

Shyam
0
 
LVL 3

Author Comment

by:absong
Comment Utility
i simply want to call a Java function from Javascript, wait for it to return, then process the result. This Java function performs HTTP communication, therefore does not work under Netscape 6.2
0

Featured Post

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.

Join & Write a Comment

Suggested Solutions

Title # Comments Views Activity
noX challenge 17 76
array6 challenfge 6 62
json format text only 4 65
Exception after setting jdbc session management 2 38
By the end of 1980s, object oriented programming using languages like C++, Simula69 and ObjectPascal gained momentum. It looked like programmers finally found the perfect language. C++ successfully combined the object oriented principles of Simula w…
Introduction This article is the second of three articles that explain why and how the Experts Exchange QA Team does test automation for our web site. This article covers the basic installation and configuration of the test automation tools used by…
This video teaches viewers about errors in exception handling.
Viewers will learn how to properly install Eclipse with the necessary JDK, and will take a look at an introductory Java program. Download Eclipse installation zip file: Extract files from zip file: Download and install JDK 8: Open Eclipse and …

743 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

17 Experts available now in Live!

Get 1:1 Help Now