I have the below applet in my code. I want to remove this code from jsp and include on click of button and remove after jQuery success.
<applet id="jzebra-applet" name="jZebra" code="jzebra.PrintApplet.class" archive="${pageContext.request.contextPath}/jzebra.jar" width="1" height="1">
<param name="printer" value="zebra">
</applet>
I am using jQuery and Struts2.
Thank you for your help in advance. Kindly let me know if any further information on my issue.
Actually, according to the Java 6 docs, the most appropriate way of calling an applet is by using a javascript supplied by Sun. That’s because different browsers deal differently with an applet. Some want the EMBED tag, some want the APPLET tag and so on.
Having said that, if you follow their recommendation, it’s just a matter of invoking the javascript in your on click event.
I am using a commandButton from JSF here, but the same idea applies to whatever html-based presentation layer you’re using.