Sorry, I should have posted more detail. Here is some sample code and a
better explanation.
You can look at the code below. It will work just fine using Win32
Mozilla, But it doesn't work using Internet Explorer on XP, and it also
doesn't work on any OS X based browser (Mozilla, Safari, Explorer).
So I guess the issue here is........is there a way to call java
functions in
javascript that will work in most current browser versions on both
platforms rather than just Mozilla on Windows?????
At the very least, getting it to work on Win32 explorer as well as Win32
mozilla would at least be a start
In my case, here is a simple HTML page with JavaScript, along with an
applet in Java code.
Except in Mozilla on Win32, every other browser basically tells me that
the function "GetData" is not a function or "Object doesn't support this
property or method"
But once again, in Mozilla Win32 it works....the question is how do I
get
it to work on Explorer Win32 and at least one OS X browser
Thanks in advance for any help......
Steve
HTML Code
------------------------------------------------------------
<HTML>
<HEAD>
<TITLE>Simple Applet Example</TITLE>
<SCRIPT>
function GetName()
{
var myApplet=document.getElementById("FMLinker")
alert(myApplet.name)
alert(myApplet.GetData())
}
</SCRIPT>
</HEAD>
<BODY>
<applet code="FMLinker.class" name="FMLinker" width=300
height=150 id="FMLinker" scriptable="true" mayscript="true">
Your browser does not support Java, so nothing is displayed.
</applet>
<form name="myForm" method="post" action="">
<input type="button" name="Button" value="Button"
onClick="GetName()">
</form>
</BODY>
</HTML>
Java Code (i stripped out a bunch of code just to get to the simplest
case)
-------------------------------------------------------------
---------------------------------------
import java.applet.*;
import java.net.*;
import java.awt.*;
import java.sql.*;
public class FMLinker extends Applet
{
public void init()
{
System.out.println("Hello, Java!");
System.out.println(GetData());
}
public String GetData()
{
String myResultString="haha";
return myResultString;
}
}
*** Sent via Developersdex
http://www.developersdex.com ***
Don't just participate in USENET...get rewarded for it!