loading java applet in yii

Dear All,

I have a problem on loading java applet of jZebra into my yii project? Any suggestion? I laod the applet like this




<applet name="jZebra" code="jzebra.PrintApplet.class" archive="<?php echo Yii::app()->baseUrl; ?>/applet/jzebra.jar" width="10" height="10">

    <param name="printer" value="zebra">

</applet>

The error is applet not found.

Thanks in advance.

Hi Daniel

Does the url in ‘archive’ attribute point to the real path of jzebra.jar?

Can you write here where jzebra.jar is situated and what url ‘archive’ attribute has?

Hi Jampire,

jzebra.jar is located on myshop/applet/jzebra.jar. My application roor folder is myshop.

if I open source code, it shows like this




<applet name="jZebra" code="jzebra.PrintApplet.class" archive="./applet/jzebra.jar" width="100" height="100">

    <param name="printer" value="zebra">

</applet>



Thanks

Daniel

archive attribute must have url link, not OS specific link! It must be something like this:

archive="http://myshop.com/applet/jzebra.jar"

try this:


<?php echo Yii::app()->request->baseUrl; ?>

instead of


<?php echo Yii::app()->baseUrl; ?>

Hi Jampire,

Thanks a lot for your help. It works now…