<
body bgcolor=#ffffff
onload="javascript:SetSize('TexApp');">
<
script type="text/javascript">
function remove(t){
document.getElementById(t).width = 1;
document.getElementById(t).height = 1;
}
function SetSize(t){
var size = new Array(2);
size = document.getElementById(t).getPrefferedSize();
document.getElementById(t).width = size[0];
document.getElementById(t).height = size[1];
document.getElementById('showme').innerHTML='<hr><font color=red><b>preffered height = '+size[1]+'<br>preffered width = '+size[0]+'</b></font>';
}
function ReadApplet(t){
var reply = document.getElementById(t).ReadApplet();
document.getElementById('showme').innerHTML='<hr><font color=red><b>'+reply+'</b></font>';
}
function ExtraInput(t){
document.getElementById('TexApp').changeInputfields(t);
}
this is some text...
<
applet id="TexApp" codebase="dist" archive="TexApp.jar" code="TexApp.class" width="1" height="1">
<
param name="latex_bgcolor" value="#ffffff"><!-- r,g,b default white -->
<
param name="latex_fgcolor" value="#000000"><!-- r,g,b default black -->
<
param name="latex" value="\left\{ \begin{array}{l} 4 \times \euro = \\ 4 \times \euro = \\ 4 \times \euro = \end{array} "> <!-- values, plain latex no
":" or
";" allowed -->
<
param name="latex_fontsize" value="18"><!-- r,g,b default black -->
<!-- optional inputfield after the latex image -->
<
param name="status" value="done"><!-- string : wims variable $status done
/waiting -->
<
param name="inputfields" value="3"><!-- int : optional : default
0 : number of inputfields on top of eachother-->
<
param name="inputfield_width" value="120"><!-- int : default
10 :
width in px of inputfield-->
<
param name="inputfield_height" value="120"><!-- optional int : default fontsize in px :
height in px of inputfield-->
<
param name="inputfield_fontsize" value ="18"><!-- int : default
10 -->
<
param name="inputfield_bgcolor" value="0,0,255"><!-- r,g,b default white -->
<
param name="inputfield_fgcolor" value="255,0,0"><!-- r,g,b default black -->
<
param name="inputfield_editable" value="1,1,1"><!-- field
1 is editable, field
2 is editable... default all editable -->
<
param name="inputfield_values" value="12,44,"><!-- optional
for correct answers: field
1 = "12", field
2 = "44" field3
= "" field4
= "22" -->
NO JAVA
and this is the rest...<
/font>
For applet autoscaling, the applet_tag
"width" should be less than
10 :
width="1"<
br>
The autoscaling SetSize
() javascript_function could be called from the htmlpage
"body onload".<
br>
!set wims_html_onload=javascript:SetSize('TexApp');
If the applet has a width > 10 , no autoscaling is performed.
<
input type="button" name="ReadApplet()" value="ReadApplet()" onclick="javascript:ReadApplet('TexApp');">
<
input type="button" name="SetSize()" value="SetSize()" onclick="javascript:SetSize('TexApp');">
<
input type="button" name="remove()" value="remove()" onclick="javascript:remove('TexApp');">
<
input type="button" name="extra inputfield" value="extra inputfield" onclick="javascript:ExtraInput('1');">
<
input type="button" name="remove inputfield" value="remove inputfield" onclick="javascript:ExtraInput('-1');">