Win a copy of The Java Performance Companion this week in the Performance forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

One HTML for running JApplet for both IE and NS

 
sabbir kazi
Ranch Hand
Posts: 62
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I understand that you need two different HTML tags in order to run an applet in IE and NS. For IE as follows:
<OBJECT classid="clsid:8AD9C840-044E-11D1-B3E9-00805F499D93"
width ="500" height="500" align="baseline"
codebase="http://java.sun.com/products/plugin/1.2/jinstall-12-win32.cab#Version=1,2,0,0">
<PARAM NAME="code" VALUE="Applet.class">
<PARAM NAME="type" VALUE="application/x-java-applet;version=1.2">
</OBJECT>
And for NS:
<EMBED type="application/x-java-applet;version=1.3"
width="500" height="500" align="baseline"
code="Applet.class"
pluginspage="http://java.sun.com/products/plugin/1.2/plugin-install.html">
</EMBED>
How can you write those two tags into one HTML?
Thanks.
 
Geoffrey Falk
Ranch Hand
Posts: 171
1
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
You can either use Javascript to detect which type of browser is being used... or else configure your web server to detect the browser type and redirect to the appropriate HTML.
Geoffrey

------------------
Sun Certified Programmer for the Java 2 Platform
 
Amaresh Patra
Greenhorn
Posts: 8
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi,
A Single HTML file may contain both the tags. IE will ignore embed tag and NS will ignore object tag.
Amaresh
 
Manfred Leonhardt
Ranch Hand
Posts: 1492
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
HI,
This is a great article giving good explanations and code examples.
http://java.sun.com/products/plugin/1.3/docs/tags.html#IEWin32
Regards,
Manfred.
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic