Go Premium for a chance to win a PS4. Enter to Win

x
?
Solved

Java applet not working in Netscape (1200 pts)

Posted on 2002-03-26
5
Medium Priority
?
255 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 1200 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

Ask an Anonymous Question!

Don't feel intimidated by what you don't know. Ask your question anonymously. It's easy! Learn more and upgrade.

Question has a verified solution.

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

Java functions are among the best things for programmers to work with as Java sites can be very easy to read and prepare. Java especially simplifies many processes in the coding industry as it helps integrate many forms of technology and different d…
In this post we will learn different types of Android Layout and some basics of an Android App.
Viewers will learn about basic arrays, how to declare them, and how to use them. Introduction and definition: Declare an array and cover the syntax of declaring them: Initialize every index in the created array: Example/Features of a basic arr…
This tutorial will introduce the viewer to VisualVM for the Java platform application. This video explains an example program and covers the Overview, Monitor, and Heap Dump tabs.
Suggested Courses

783 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