Solved

Java applet not working in Netscape (1200 pts)

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

[Webinar] How Hackers Steal Your Credentials

Do You Know How Hackers Steal Your Credentials? Join us and Skyport Systems to learn how hackers steal your credentials and why Active Directory must be secure to stop them. Thursday, July 13, 2017 10:00 A.M. PDT

Question has a verified solution.

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

INTRODUCTION Working with files is a moderately common task in Java.  For most projects hard coding the file names, using parameters in configuration files, or using command-line arguments is sufficient.   However, when your application has vi…
Introduction This article is the last of three articles that explain why and how the Experts Exchange QA Team does test automation for our web site. This article covers our test design approach and then goes through a simple test case example, how …
Viewers learn about the scanner class in this video and are introduced to receiving user input for their programs. Additionally, objects, conditional statements, and loops are used to help reinforce the concepts. Introduce Scanner class: Importing…
This tutorial covers a practical example of lazy loading technique and early loading technique in a Singleton Design Pattern.

617 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