GeeCON Prague 2014*
The moose likes Applets and the fly likes why is a applet not running in some Browser Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


JavaRanch » Java Forums » Java » Applets
Bookmark "why is a applet not running in some Browser" Watch "why is a applet not running in some Browser" New topic
Author

why is a applet not running in some Browser

Anonymous
Ranch Hand

Joined: Nov 22, 2008
Posts: 18944
What is the reason why an applet will be running in appletviewer but not in a browser.
Pradeepta Bhattacharya
Greenhorn

Joined: Sep 07, 2001
Posts: 15
Originally posted by Ify Innoma:
What is the reason why an applet will be running in appletviewer but not in a browser.

Try Out With This Html ... i Hope it will solve your problem
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 3.2//EN">
<html>
<head>
<title>Idea Management System</title>
<script language="JavaScript">
function MyToolBar()
{
window.open("Login.html","LoginPage","toolbar=0,menubar=0,scrollbar=0,resizable=0,directories=0,width='110%',height='150%'");
}
</script>
</head>
<body BGCOLOR="#ffffff" LINK="#000099">
<blockquote>
<!--"CONVERTED_APPLET"-->
<!-- CONVERTER VERSION 1.1 -->
<SCRIPT LANGUAGE="JavaScript"><!--
var _info = navigator.userAgent; var _ns = false;
var _ie = (_info.indexOf("MSIE") > 0 && _info.indexOf("Win") > 0 && _info.indexOf("Windows 3.1") < 0);
//--></SCRIPT>
<COMMENT><SCRIPT LANGUAGE="JavaScript1.1"><!--
var _ns = (navigator.appName.indexOf("Netscape") >= 0 && ((_info.indexOf("Win") > 0 && _info.indexOf("Win16") < 0 && java.lang.System.getProperty("os.version").indexOf("3.5") < 0) | | (_info.indexOf("Sun") > 0) | | (_info.indexOf("Linux") > 0)));
//--></SCRIPT></COMMENT>
<SCRIPT LANGUAGE="JavaScript"><!--
if (_ie == true) document.writeln('<Center><OBJECT classid="clsid:8AD9C840-044E-11D1-B3E9-00805F499D93" WIDTH = "100%" HEIGHT = "150%" codebase="http://java.sun.com/products/plugin/1.1.2/jinstall-112-win32.cab#Version=1,1,2,0"><NOEMBED><XMP>');
else if (_ns == true) document.writeln('<EMBED type="application/x-java-applet;version=1.1.2" java_CODE = "MyApplet.class" WIDTH = "110%" HEIGHT = "150%" pluginspage="http://java.sun.com/products/plugin/1.1.2/plugin-install.html"><NOEMBED><XMP>');
//--></SCRIPT>
<APPLET CODE = "MyApplet.class" WIDTH = "110%" HEIGHT = "150%" ></XMP>
<PARAM NAME = CODE VALUE = "MyApplet.class" >
</APPLET>
</NOEMBED></EMBED></OBJECT></Center>

<!--
<APPLET CODE = "MyApplet.class" WIDTH = "110%" HEIGHT = "150%" >

</APPLET>
-->
</body>
</html>
parul patidar
Ranch Hand

Joined: Sep 07, 2001
Posts: 53
following may be reasons
1 swing applet does not run in browser without java plug-in
2 Appletviewer assumes all applet to be trusted applet.other browsers does not assume this if ur applet contains untrusted code then security exception will be generated
3 ie supports only java 1.1 so any classes of 1.2 won't work in applet also u can't use thos methods which are included in a class after 1.1 won't work
i dont knoww more reasons
Anonymous
Ranch Hand

Joined: Nov 22, 2008
Posts: 18944
Thanks a lot this has really help me
 
GeeCON Prague 2014
 
subject: why is a applet not running in some Browser