Welcome to WebmasterWorld Guest from 22.214.171.124
Forum Moderators: incrediBILL
The site features a number of Java applets that add interactivity to images. When you click on the images, a caption appears, a sound plays, something like that.
I designed the applets to use an alternate image in case someone used a browser in which Java was disabled. The alternate, non-interactive image appeared in place of the Java applet. I specified the alternate image in a tag within the APPLET tag, something like: <IMG usemap="#altimage" src="altimage.jpg" width=191 height=340 border=0>
This worked fine in previous versions of Netscape and continues to work fine in IE. If Java is disabled, the image specified in the IMG tag's src attribute appears in place of the applet. However, the applet simply disappears in Netscape 7.2 and Firefox 0.9.3 (as if the entire applet had been commented out). This is especially awkward when the text refers to the image.
Is there a technique other than APPLET that will let NS and FF show the applet's alternate images if Java is disabled? My knowledge of HTML is quite basic and not very current, and I know that tags and techniques come and go.
Any suggestions would be gratefully received.
Is there a technique other than APPLET...
Yes - <applet> is now a deprecated element, and the suggested replacement is <object>. Since the two modern browsers you mention are much more standards compliant than IE, you may be running into this.
It's good to hear you are "future-proofing" your mark-up. Hope this helps.
In the following example, the APPLET element includes a Java applet in the document. Since no codebase is supplied, the applet is assumed to be in the same directory as the current document.<APPLET code="Bubbles.class" width="500" height="500">
Java applet that draws animated bubbles.
</APPLET>This example may be rewritten with OBJECT as follows:<P><OBJECT codetype="application/java"
Java applet that draws animated bubbles.
</OBJECT>W3C Reference [w3.org]
Also, have you run your existing pages through the W3C validator [validator.w3.org]? You may also be bumping into non-valid mark-up rather than just deprecated mark-up.
Thanks very much. I'll certainly have a go at this.
> Also, have you run your existing pages through the W3C validator? You may
> also be bumping into non-valid mark-up rather than just deprecated
Yes, I did in fact use the W3C validator as soon as I discovered the problem. I almost wish I hadn't--the code is a freakin' train wreck from a compliance standpoint.
Here's the thing: I didn't CHOSE to violate standards. I just relied on the authoring tool to comply. Admittedly, it was some years ago, and standards have evolved. I used Dreamweaver 4 for most of it.
If I upgraded to a newer version of Dreamweaver, would it create HTML that complied with W3C standards? I'd hate to keep using a tool that made pages newer browsers choked on.
No. It won't. DW creates a nightmare of crap-code, no matter which version you use. DWMX is materially better than DW 4, but still not "clean". Yes, you can do some tweaks in prefs etc. to minimalize some of the pain, but it still is not a code-clean-compliant tool.
Hm. I don't really use Dreamweaver except as a code-highlighting ftp program, but I always seem to end up defending it against these kinds of charges.
Dreamweaver is a poor product in a certain way; it's actually pretty difficult to use it to create good markup until you have already learned how to create good markup without it. But provided you know your way around valid HTML, it makes a decent IDE, and provided your markup/CSS is not too complex,* you can get a lot of mileage out of it by using the wysiwyg tools to save your having to fully type out links, anchors etc.
The closer your pages are to simple, structured documents, the more you can use the wysiwyg environment to speed up the process; for this type of work, even its CSS tools are pretty good.
*Is anyone from Macromedia reading this? Dreamweaver (at least up to the MX release) is totally inadequate as a wysiwyg tool for designing with complex floated or positioned divs. Just thought you might like to know...