473,511 Members | 15,364 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

Applet event handlers changed with Java 1.4.x?

I recently "inherited" a project which involves an applet on a web
page, and
some Javascript event handling functions. The handler definition looks
like
this:
<SCRIPT LANGUAGE=javascript FOR=Foo EVENT=mouseReleased>
<!--
Foo_mouseReleased();
//-->
</SCRIPT>

where Foo is an applet with parameter FiresScriptEvents set to TRUE.
The
function Foo_mouseReleased() is a simple javascript function that just
alerts
a fixed message so I know it's been called.

When I run this applet in a vanilla IE5.5 or IE6, it does exactly what
I expect - when the mouse is released, up pops my alert. BUT when I
run it on the same browser with Java Plug-In 1.4.2 installed, I don't
see it. Is there some compatibility issue with 1.4.x? Can the code be
changed relatively simply to work with both VMs, or am I looking at a
big rebuild to support browsers both with and without the plug-in?

Thanks a lot,

Julian
Jul 23 '05 #1
2 1914
Java plugin is not from microsoft, I guess thats why its not
supported...

You could call JavaScript from Java using the Netscape package,
which, I thought, was included in Internet Explorer...

http://www.rgagnon.com/javadetails/java-0172.html

or you could attempt to use:

getAppletContext().showDocument(
new URL(
"javascript:alert('Hello')"));

Greetings,
Vincent

Julian Hayward wrote:
I recently "inherited" a project which involves an applet on a web
page, and
some Javascript event handling functions. The handler definition looks
like
this:
<SCRIPT LANGUAGE=javascript FOR=Foo EVENT=mouseReleased>
<!--
Foo_mouseReleased();
//-->
</SCRIPT>

where Foo is an applet with parameter FiresScriptEvents set to TRUE.
The
function Foo_mouseReleased() is a simple javascript function that just
alerts
a fixed message so I know it's been called.

When I run this applet in a vanilla IE5.5 or IE6, it does exactly what
I expect - when the mouse is released, up pops my alert. BUT when I
run it on the same browser with Java Plug-In 1.4.2 installed, I don't
see it. Is there some compatibility issue with 1.4.x? Can the code be
changed relatively simply to work with both VMs, or am I looking at a
big rebuild to support browsers both with and without the plug-in?

Thanks a lot,

Julian


Jul 23 '05 #2


Julian Hayward wrote:
I recently "inherited" a project which involves an applet on a web
page, and
some Javascript event handling functions. The handler definition looks
like
this:
<SCRIPT LANGUAGE=javascript FOR=Foo EVENT=mouseReleased>
<!--
Foo_mouseReleased();
//-->
</SCRIPT>
The syntax <script for event> is basically an IE extension, it is not
supported by other browsers (at least not in general, the latest
Netscape 7.1 release makes some attempts but as far as I know only to
support Window Media Player scripting with Netscape 7.1/Windows).

where Foo is an applet with parameter FiresScriptEvents set to TRUE.
I have never heard of that parameter, and a search on
http://java.sun.com/ doesn't turn up any results. Nor does a search on
msdn.microsoft.com.
Where did you find that parameter, is it one specified for applets run
with the MS JVM?
The
function Foo_mouseReleased() is a simple javascript function that just
alerts
a fixed message so I know it's been called.

When I run this applet in a vanilla IE5.5 or IE6, it does exactly what
I expect - when the mouse is released, up pops my alert. BUT when I
run it on the same browser with Java Plug-In 1.4.2 installed, I don't
see it. Is there some compatibility issue with 1.4.x? Can the code be
changed relatively simply to work with both VMs, or am I looking at a
big rebuild to support browsers both with and without the plug-in?


I would be rather surprised if you can handle events happening inside of
a Java applet with script in the page containing the applet in a cross
browser way. I don't think that works with browsers using the Sun Java
plugin.

--

Martin Honnen
http://JavaScript.FAQTs.com/

Jul 23 '05 #3

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

2
3473
by: Michael | last post by:
Hello Currently I'm migrating an applet from Java 1.1 to 1.3. Targetplattform: Microsoft Internet Explorer 5.x with Sun's Java VM 1.3.1 Problem: The attached applet works fine with the...
0
9857
by: James Hong | last post by:
Help please, I try to sending an email from my html page using the java applet. but it give error on most of the PC only very few work, what is the error i make the java applet show as below ...
3
3495
by: Larry Martin | last post by:
I am trying to run a Java Applet on my ascx page and am getting an IO exception when IE6 tries to load the applet. It seems a lot of others are getting the same problem but a search of the web did...
8
3363
by: DKM | last post by:
Here are the source code files to a Java applet that utilizes LiveConnect to communicate with Javascript, and the HTML file. The thing works both in IE 6.0 and FireFox 1.4. but with some...
0
5648
by: ankur | last post by:
WHEN I RUN THIS WEB APPLICATION ON Tomcat5.5.9 SERVER MY HttpChatApplet sccessfully Loaded from ChatDispatch but running on some another PC HttpChatApplet not loaded my Coad ...
0
1467
by: shanmukhi | last post by:
Hi All I got a problem in running java programs. i am not able to run java applet while running i got a problem as Loading Java Applet Failed java.lang.NoClassDefFoundError: App (wrong...
1
6600
by: dishal | last post by:
Can anyone help me please? How do I convert these codes to launch from a JFrame instead of a Java Applet? A simple program where the user can sketch curves and shapes in a variety of...
4
7793
by: tudyfruity18 | last post by:
I'm suppose to write an applet that contains two buttons Investment calculator and Loan Calculator. When the Investment Calculator button is clicked, a frame appears in a new window for calculating...
2
2637
by: Richard Maher | last post by:
Hi, Can someone please tell me the strategy(ies) used by Java (the Security Manager or whatever) to determine if a given IP address conforms to the definition of the codebase from which an...
0
7242
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
7418
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
1
7075
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
0
7508
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...
0
5662
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...
1
5063
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new...
0
4737
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and...
0
3222
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The...
0
1572
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated ...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.