Solved

Java applet not working in Netscape (1200 pts)

Posted on 2002-03-26
5
240 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
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

Is Your Active Directory as Secure as You Think?

More than 75% of all records are compromised because of the loss or theft of a privileged credential. Experts have been exploring Active Directory infrastructure to identify key threats and establish best practices for keeping data safe. Attend this month’s webinar to learn more.

Question has a verified solution.

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

Suggested Solutions

Title # Comments Views Activity
JDeveloper 12c for 32 bit 4 67
eclipse compiler vs Installed JREs option 3 73
couple of eclipse 5 16
tomcat not starting 6 24
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…
Basic understanding on "OO- Object Orientation" is needed for designing a logical solution to solve a problem. Basic OOAD is a prerequisite for a coder to ensure that they follow the basic design of OO. This would help developers to understand the b…
Video by: Michael
Viewers learn about how to reduce the potential repetitiveness of coding in main by developing methods to perform specific tasks for their program. Additionally, objects are introduced for the purpose of learning how to call methods in Java. Define …
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.

919 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

13 Experts available now in Live!

Get 1:1 Help Now