Problem: Java Applet doesn’t load on a WordPress page.

Problem:

I tried to embed a Java Applet into my WordPress page. The applet worked perfectly on an HTML page, but when I pasted it into the WordPress page, it didn’t show. What’s wrong?

Answer:

Make sure there’re no line breaks in your applet code. WordPress adds <p> and <br /> tags automatically, while this doesn’t happen in an HTML page. So if your applet code is:

<APPLET name=”IpixViewer”
code=”IpixViewer.class”
archive=”IpixViewer.jar”
width=”320″ height=”240″>
<PARAM NAME=”url” VALUE=”YOURIMAGE.ipx”>
<PARAM NAME=”toolbar” VALUE=”on”>
<PARAM NAME=”initfov” VALUE=”80″>
</APPLET>

Make sure when you paste it in your WordPress page, it should be all in one line of code, like this:

<APPLET name=”IpixViewer” code=”IpixViewer.class” archive=”IpixViewer.jar” width=”320″ height=”240″><PARAM NAME=”url” VALUE=”YOURIMAGE.ipx”><PARAM NAME=”toolbar” VALUE=”on”><PARAM NAME=”initfov” VALUE=”80″></APPLET>

That should solve your problem.

Advertisements

2 Comments

  1. Posted March 16, 2011 at 7:43 pm | Permalink

    I have the same problem. I’m trying to embad this applet into a post, but when i click Update the text just disappear. It works fine localy.

One Trackback

  1. By Embed Java Applet in WordPress - huy'z on July 1, 2011 at 2:32 pm

    […] that you can protect an applet by putting the <applet> and enclosed <param> tags all on a single line.  But if you switch from the Visual to the HTML tab in the “Edit Post” page or if you […]

%d bloggers like this: