Solved

Java applet not working in Netscape (1200 pts)

Posted on 2002-03-26
5
250 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
[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
5 Comments
 
LVL 16

Accepted Solution

by:
heyhey_ earned 300 total points
ID: 6898653
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
ID: 6899590
heyhey, thanks
i will get that to you in about two hours.
0
 
LVL 3

Author Comment

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

Expert Comment

by:shyamkumarreddy
ID: 6901807
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
ID: 6905611
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

Announcing the Most Valuable Experts of 2016

MVEs are more concerned with the satisfaction of those they help than with the considerable points they can earn. They are the types of people you feel privileged to call colleagues. Join us in honoring this amazing group of Experts.

Question has a verified solution.

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

Java had always been an easily readable and understandable language.  Some relatively recent changes in the language seem to be changing this pretty fast, and anyone that had not seen any Java code for the last 5 years will possibly have issues unde…
Java Flight Recorder and Java Mission Control together create a complete tool chain to continuously collect low level and detailed runtime information enabling after-the-fact incident analysis. Java Flight Recorder is a profiling and event collectio…
Viewers will learn about the regular for loop in Java and how to use it. Definition: Break the for loop down into 3 parts: Syntax when using for loops: Example using a for loop:
This tutorial explains how to use the VisualVM tool for the Java platform application. This video goes into detail on the Threads, Sampler, and Profiler tabs.

734 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