Home | Contact Us | FAQ | Search & Site Map | Link to Us
Sign In | Join | Other 45 Sites in Network
HomeAnnouncementsWhite Papers
Discussion GroupsFirst AidDatabasesJavaBeansGUIJava 3DVirtual MachineCORBASecurityToolsGeneral
Java DirectoryOpen Source ProjectsSample Book ChaptersUser GroupsWeb Resources
Related Topics
Databases.NETMore Topics ...

Java Forum / General / March 2006

Tip: Looking for answers? Try searching our database.

Applets and object in XHTML

Thread view: 
Red Winestain - 05 Mar 2006 18:16 GMT
I've been asked to update some web pages to XHTML 1.0 strict so that it
validates via the w3c validator. This means I need to replace the
<applet> tags with <object>. How do you use an object tag to load a
java applet that lives elsewhere on the server?

For example, I used to use the following (for a class, not a jar):

<applet codebase="../classes/" code=AppletCode width=500 height=190>
 <param  name="variable" value="1">
 Your browser does not have Java enabled.
</applet>

I've got the following to work (validate and load the applet) but only
if the html page is in the same directory as the applet:

<object
 type="application/x-java-applet"
 classid="java:AppletCode.class"
 height="500" width="190" >
 <param name="varialbe" value="1" />
Your browser does not have Java enabled.
</object>

I can't get any form of the codebase statement to work. Any suggestions?
Red Winestain - 05 Mar 2006 20:18 GMT
Adding the following seems to work (Safari, Opera, Camino, and
Firefox), in terms of validating and in loading the applet:

<param name="java_codebase" value="../classes/" />
Raymond DeCampo - 12 Mar 2006 15:47 GMT
> I've been asked to update some web pages to XHTML 1.0 strict so that it
> validates via the w3c validator. This means I need to replace the
[quoted text clipped - 20 lines]
>
> I can't get any form of the codebase statement to work. Any suggestions?

I think that the classid attribute you have is off.  The classid is not
a Java-specific attribute, it is used to identify the plug-in, in this
case the Java plug-in.

Try using the HTMLConverter tool that comes with the JDK (in the bin
directory with the other tools).  This will at least get you started if
you do not like the results (as some here do not).

HTH,
Ray

Signature

This signature intentionally left blank.



Free Magazines

Get these publications absolutely FREE for up to 12 months. There are no hidden fees and no obligation. Simply choose a title, complete the application form and submit it. Read more ...

Oracle MagazineNetwork ComputingComputer WorldBio-IT WorldeWeekInformation WeekInfosecurity
 
Sign In
Join
My Latest Posts
My Monitored Threads
My Blog
My Photo Gallery
My Profile
My Homepage

Start New Thread
Enable EMail Alerts
Rate this Thread



©2008 Advenet LLC   Privacy Policy - Terms of Use
This website includes both content owned or controlled by Advenet as well as content owned or controlled by third parties.