|
|
|
|
![]() ![]() |
Apr 28 2007, 07:12 PM
Post
#1
|
|
|
Super Member Group: [HOSTED] Posts: 738 Joined: 12-July 06 From: Ontario, Canada Member No.: 14,464 |
I have a Java Applet for a chat room that is using the <applet> tag. It looks like it was from HTML 3.2 but I am using XHTML 1.1 (application/xhtml+xml), so I have to use the <object> element.
For now I have forced that page to load as XHTML 1.0 Transitional in text/html MIME type because I don't know how to fix the problem. I have tried many suggestions from many sites but they don't work in Firefox, Internet Explorer or Opera (some of them are IE-only but they still don't work in IE). Is there any way that the <object> element can be implemented with cross-browser compatibility? I thought it would be as easy as <object> for Flash, but I guess not. |
|
|
|
Apr 29 2007, 10:56 AM
Post
#2
|
|
|
Super Member Group: [HOSTED] Posts: 796 Joined: 8-April 06 From: Lima - Peru Member No.: 12,579 myCENTs:29.64 |
I have a Java Applet for a chat room that is using the <applet> tag. It looks like it was from HTML 3.2 but I am using XHTML 1.1 (application/xhtml+xml), so I have to use the <object> element. For now I have forced that page to load as XHTML 1.0 Transitional in text/html MIME type because I don't know how to fix the problem. I have tried many suggestions from many sites but they don't work in Firefox, Internet Explorer or Opera (some of them are IE-only but they still don't work in IE). Is there any way that the <object> element can be implemented with cross-browser compatibility? I thought it would be as easy as <object> for Flash, but I guess not. Well, take a look to the help section of the W3C Validator website, it has a lot of usefull tips, check How can I include flash in valid (X)HTML Web pages? and the Flash Satay technique, both of them are related to flash but i think that could help you. Best regards, |
|
|
|
Apr 29 2007, 07:19 PM
Post
#3
|
|
|
Super Member Group: [HOSTED] Posts: 738 Joined: 12-July 06 From: Ontario, Canada Member No.: 14,464 |
Well, take a look to the help section of the W3C Validator website, it has a lot of usefull tips, check How can I include flash in valid (X)HTML Web pages? and the Flash Satay technique, both of them are related to flash but i think that could help you. Best regards, I already use that method to incorporate Flash into my pages. I need help implementing a Java applet, not a Flash object. It doesn't work that way, I already tried it. |
|
|
|
Apr 30 2007, 05:10 AM
Post
#4
|
|
|
Super Member Group: [HOSTED] Posts: 796 Joined: 8-April 06 From: Lima - Peru Member No.: 12,579 myCENTs:29.64 |
I already use that method to incorporate Flash into my pages. I need help implementing a Java applet, not a Flash object. It doesn't work that way, I already tried it. Sorry, take a look at the XHTML Reference - Object website for a complete reference. Best regards, |
|
|
|
May 1 2007, 12:59 PM
Post
#5
|
|
|
Super Member Group: [HOSTED] Posts: 738 Joined: 12-July 06 From: Ontario, Canada Member No.: 14,464 |
I know the attributes for <object>. I just don't know what to put in which attribute where.
Here is the original code that the site gives you: HTML <table border=0 width=500 align=center><tr><td> <applet archive="http://www.freejavachat.com/java/cr.zip" codebase="http://www.freejavachat.com/java/" name=cr code="ConferenceRoom.class" width=500 height=300> (some alternate text) </applet> </td></tr></table> <br><center><a href="http://www.freejavachat.com">Free Chat</a> provided by freejavachat.com</center> The main thing in there is the <applet>. I tried using: HTML <object archive="http://www.freejavachat.com/java/cr.zip" data="http://www.freejavachat.com/java/" name='cr' codebase="ConferenceRoom.class" style="width:500px;height:300px"> (some alternate text) </object> But it doesn't seem to work. I have tried some other combinations of the <object> attributes but I haven't been able to get it right. |
|
|
|
May 3 2007, 08:41 PM
Post
#6
|
|
|
Super Member Group: Members Posts: 540 Joined: 29-September 06 Member No.: 16,228 |
Well, look at the params. Codebase for example, you gave it a totally different input. What happens when you use the <applet ... > from the first, then change applet to object?
|
|
|
|
May 5 2007, 06:35 PM
Post
#7
|
|
|
Super Member Group: [HOSTED] Posts: 738 Joined: 12-July 06 From: Ontario, Canada Member No.: 14,464 |
Well, look at the params. Codebase for example, you gave it a totally different input. What happens when you use the <applet ... > from the first, then change applet to object? I changed codebase because the codebase referred to in <applet> is actually the data of the object. And if I just change the element name from <applet...> to <object...> then it will still not function properly. |
|
|
|
May 6 2007, 07:30 PM
Post
#8
|
|
|
Member [ Level 2 ] Group: Members Posts: 71 Joined: 16-December 06 Member No.: 18,419 |
Ok, here's what I got from one website:
CODE XHTML (using object tag) <!--[if !IE]>--> <object classid="java:Sample2.class" type="application/x-java-applet" height="300" width="450" > <!--<![endif]--> <object classid="clsid:8AD9C840-044E-11D1-B3E9-00805F499D93" height="300" width="450" > <param name="code" value="Sample2" /> </object> <!--[if !IE]>--> </object> <!--<![endif]--> You could use some sort of JavaScript to display the correct one. The site is http://ww2.cs.fsu.edu/~steele/XHTML/appletObject.html if that's not exactly what you're looking for (they have more). This post has been edited by bluefish: May 6 2007, 07:31 PM |
|
|
|
May 7 2007, 02:03 AM
Post
#9
|
|
|
Techno-Necromancer Group: Members Posts: 1,018 Joined: 13-January 05 From: The Net Member No.: 2,127 |
It looks like the above method is the best bet. I'm very disappointed in the lack of full support of objects in browsers. For example, there are some tricks that use inline frames which should be able to use objects, but unfortunately, changing parameters via javascript doesn't cause the object to be reloaded, and I have yet to find a way to reload objects manually. But I think merging the above method with the Flash-Satay method should yield good results, especially since streaming Java applets is usually not possible anyway.
~Viz |
|
|
|
![]() ![]() |
Similar Topics
|
Lo-Fi Version | Time is now: 23rd November 2008 - 05:18 PM |