/    Sign up×
Community /Pin to ProfileBookmark

XHTML Java applet/object

OK, I’m working on a site right now and I decided that I would use one of our hosts free add-ons, a chat room. I copied the code over into a page source and tested it and it ran just fine. When I validated the page (XHTML 1.1), it was invalid due to the applet code.
So I got out my book o’ XHTML and found that I could use object instead of applet, so I changed the code accordingly and it is now valid.

The problem is this. When I used the invalid code provided by the host, the applet worked, however when I changed to the object code it stopped working in IE (still works in Mozilla though). Could this be because of the xml decleration at the top of the page throwing IE into quirks mode?

The code provided:

[code]
<applet code=”babylonApplet.class” codebase=”http://members.freewebs.com/Chat/”>
<param name=”servername” value=”members.freewebs.com” />
<param name=”portnumber” value=”12468″ />
<param name=”autoconnect” value=”yes” />
<param name=”embed” value=”yes” />
<param name=”usepasswords” value=”no” />
<param name=”hidecanvas” value=”yes” />
<param name=”autoconnect” value=”yes” />
<param name=”chatroom” value=”3373955″ />
</applet>
[/code]

The new code:

[code]
<object codetype=”application/java” classid=”java:babylonApplet.class” codebase=”http://members.freewebs.com/Chat/”>
<param name=”servername” value=”members.freewebs.com” />
<param name=”portnumber” value=”12468″ />
<param name=”autoconnect” value=”yes” />
<param name=”embed” value=”yes” />
<param name=”usepasswords” value=”no” />
<param name=”hidecanvas” value=”yes” />
<param name=”autoconnect” value=”yes” />
<param name=”chatroom” value=”3373955″ />
</applet>
[/code]

The troublesome page – [url]http://www.freewebs.com/hackus/chat.html[/url]

to post a comment
HTML

6 Comments(s)

Copy linkTweet thisAlerts:
@PeOfEoFeb 08.2004 — because look you have a </applet> tag when you are using <object> :p
Copy linkTweet thisAlerts:
@David_HarrisonauthorFeb 08.2004 — Duh!!! I validated it and that error came up, I was so sure I fixed it, I must have uploaded an older version. I didn't even think to check that.

Edit: I changed it and it still doesn't work.
Copy linkTweet thisAlerts:
@PeOfEoFeb 08.2004 — bah oh well... code="babylonApplet.class" try putting that in the object tag and getting rid of classid. Prolly will not be valid... but I do not know what else would cause it.
Copy linkTweet thisAlerts:
@fredmvFeb 08.2004 — [i]Originally posted by lavalamp [/i]

[B]Could this be because of the xml decleration at the top of the page throwing IE into quirks mode?[/B][/QUOTE]
Have you tried removing the XML prolog yet?
Copy linkTweet thisAlerts:
@David_HarrisonauthorFeb 08.2004 — I don't really want to try PeOfEo's idea (sorry PeOfEo, I want valid code), but I did try fredmv's idea since the xml decleration is optional. Unfortunately it didn't work.

I'm quite confused with this because in the book it had an example of how to include Java applets in pages, this is the URL - http://www.cookwood.com/html5ed/examples/multimedia/javaobject.html

It seems that the code there is the same as the code I'm using.
Copy linkTweet thisAlerts:
@PeOfEoFeb 08.2004 — my code might or might not be valid. I have not checked to see if that attribute could go w/ object. I do not use applets a lot. I have used them in my java class a few times, that is it. I hate applets (I hate java too, but thats what is offered in ap comp sci)
×

Success!

Help @David_Harrison spread the word by sharing this article on Twitter...

Tweet This
Sign in
Forgot password?
Sign in with TwitchSign in with GithubCreate Account
about: ({
version: 0.1.9 BETA 5.19,
whats_new: community page,
up_next: more Davinci•003 tasks,
coming_soon: events calendar,
social: @webDeveloperHQ
});

legal: ({
terms: of use,
privacy: policy
});
changelog: (
version: 0.1.9,
notes: added community page

version: 0.1.8,
notes: added Davinci•003

version: 0.1.7,
notes: upvote answers to bounties

version: 0.1.6,
notes: article editor refresh
)...
recent_tips: (
tipper: @AriseFacilitySolutions09,
tipped: article
amount: 1000 SATS,

tipper: @Yussuf4331,
tipped: article
amount: 1000 SATS,

tipper: @darkwebsites540,
tipped: article
amount: 10 SATS,
)...