• We’re currently investigating an issue related to the forum theme and styling that is impacting page layout and visual formatting. The problem has been identified, and we are actively working on a resolution. There is no impact to user data or functionality, this is strictly a front-end display issue. We’ll post an update once the fix has been deployed. Thanks for your patience while we get this sorted.

Calling Java applet functions via JavaScript in OS X (IE, Firebird)

ugh

Platinum Member
Hi folks,

Been trying to perform the aforementioned task in OS X and somehow neither IE (5.2.2) nor Firebird (one of the latest nightlies) can do it. I've also installed JDK 1.4.1 on OS X. The applet loads fine in the page as well. I've tried the exact same code in Windows with IE6 and Firebird and it works perfectly fine.

Anyone has experience in this?


Thanks.
 
TestApp.java

import java.applet.*;
import java.awt.*;
import java.util.*;

public class TestApp extends Applet {
public void init() {
this.setLayout(new FlowLayout(FlowLayout.CENTER, 10, 10));
this.setBackground(new Color(255, 200, 0));

}

public String getVersion() {
return System.getProperty("java.version");
}

public String getVendor() {
return System.getProperty("java.vendor");
}

public void paint(Graphics g) {
g.drawString("hello world!", 5, 10);
}

}


Test.html

<html>
<body>

<script language="javascript">

function doIt(val) {
if (val == "version") {
alert("Version: " + document.TestApp.getVersion());
} else if (val == "vendor") {
alert("Vendor: " + document.TestApp.getVendor());
} else {
alert(val);
}
}
</script>


<a href="javascript😀oIt('version')">Version</a>

<a href="javascript😀oIt('vendor')">Vendor</a>

<a href="javascript😀oIt('blah')">Version</a>


<applet name="TestApp" height="100" width="100" code="TestApp.class" codebase=".">
</applet>

</body>

</html>
 
MrChad: Thanks for the info. Darn, I guess there's no way to get my application to work on Mac 🙁
 
Back
Top