i have a java applet in a form like following
$form['applet'] = array(
'#prefix' => '<div>',
'#markup' => '<p align=center>
<applet codebase="." code="Clock.class" width=170 height=150>
</applet>
</p>',
'#suffix' => '</div>',
);
where should i place Clock.class
file such that drupal always loads it.Something to do with base_path
function.
I'm not familiar with applets. But if you need to make an absolute path to it, you should place it in the module creating the form and use
drupal_get_path
.In code this would look like this:
Using the above code, you need to place the applet in the root of your custom module. You could also make a subfolder for you applet and place it there if you like. The latter is the most drupal way of doing it, but I tend to only create subfolders if I more than 3-5 files in a module.