Rev 4034 | Go to most recent revision | Details | Last modification | View Log | RSS feed
Rev | Author | Line No. | Line |
---|---|---|---|
3653 | schaersvoo | 1 | <html> |
2 | <body bgcolor=#ffffff onload="javascript:SetSize('TexApp');"> |
||
3 | <script type="text/javascript"> |
||
4 | |||
5 | |||
6 | |||
7 | function remove(t){ |
||
8 | document.getElementById(t).width = 1; |
||
9 | document.getElementById(t).height = 1; |
||
10 | } |
||
11 | |||
12 | function SetSize(t){ |
||
13 | var size = new Array(2); |
||
14 | size = document.getElementById(t).getPrefferedSize(); |
||
15 | document.getElementById(t).width = size[0]; |
||
16 | document.getElementById(t).height = size[1]; |
||
17 | document.getElementById('showme').innerHTML='<hr><font color=red><b>preffered height = '+size[1]+'<br>preffered width = '+size[0]+'</b></font>'; |
||
18 | |||
19 | } |
||
20 | function ReadApplet(t){ |
||
21 | var reply = document.getElementById(t).ReadApplet(); |
||
22 | document.getElementById('showme').innerHTML='<hr><font color=red><b>'+reply+'</b></font>'; |
||
23 | } |
||
24 | |||
25 | function ExtraInput(t){ |
||
26 | document.getElementById('TexApp').changeInputfields(t); |
||
27 | } |
||
28 | </script> |
||
29 | <div id="showme"></div> |
||
30 | <table ><tr valign=middle ><th> |
||
31 | <font color=red> |
||
32 | this is some text... |
||
33 | </font> |
||
34 | </th> |
||
35 | <th> |
||
36 | <applet id="TexApp" codebase="dist" archive="TexApp.jar" code="TexApp.class" width="1" height="1"> |
||
37 | <param name="latex_bgcolor" value="#ffffff"><!-- r,g,b default white --> |
||
38 | <param name="latex_fgcolor" value="#000000"><!-- r,g,b default black --> |
||
39 | <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 --> |
||
40 | <param name="latex_fontsize" value="18"><!-- r,g,b default black --> |
||
41 | |||
42 | <!-- optional inputfield after the latex image --> |
||
43 | <param name="status" value="done"><!-- string : wims variable $status done/waiting --> |
||
44 | <param name="inputfields" value="3"><!-- int : optional : default 0 : number of inputfields on top of eachother--> |
||
45 | <param name="inputfield_width" value="120"><!-- int : default 10 : width in px of inputfield--> |
||
46 | <param name="inputfield_height" value="120"><!-- optional int : default fontsize in px : height in px of inputfield--> |
||
47 | <param name="inputfield_fontsize" value ="18"><!-- int : default 10 --> |
||
48 | <param name="inputfield_bgcolor" value="0,0,255"><!-- r,g,b default white --> |
||
49 | <param name="inputfield_fgcolor" value="255,0,0"><!-- r,g,b default black --> |
||
50 | <param name="inputfield_editable" value="1,1,1"><!-- field 1 is editable, field 2 is editable... default all editable --> |
||
51 | <param name="inputfield_values" value="12,44,"><!-- optional for correct answers: field 1 = "12", field 2 = "44" field3= "" field4 = "22" --> |
||
52 | NO JAVA |
||
53 | </applet> |
||
54 | </th> |
||
55 | <th> |
||
56 | <font color=red> |
||
57 | and this is the rest...</font> |
||
58 | </th></tr> |
||
59 | </table> |
||
60 | <p> |
||
61 | <font color=white> |
||
62 | For applet autoscaling, the applet_tag "width" should be less than 10 : width="1"<br> |
||
63 | The autoscaling SetSize() javascript_function could be called from the htmlpage "body onload".<br> |
||
64 | Or in WIMS:<br> |
||
65 | !set wims_html_onload=javascript:SetSize('TexApp'); |
||
66 | <br> |
||
67 | If the applet has a width > 10 , no autoscaling is performed. |
||
68 | </font> |
||
69 | <br> |
||
70 | <input type="button" name="ReadApplet()" value="ReadApplet()" onclick="javascript:ReadApplet('TexApp');"> |
||
71 | <input type="button" name="SetSize()" value="SetSize()" onclick="javascript:SetSize('TexApp');"> |
||
72 | <input type="button" name="remove()" value="remove()" onclick="javascript:remove('TexApp');"> |
||
73 | <br> |
||
74 | <input type="button" name="extra inputfield" value="extra inputfield" onclick="javascript:ExtraInput('1');"> |
||
75 | <input type="button" name="remove inputfield" value="remove inputfield" onclick="javascript:ExtraInput('-1');"> |
||
76 | </body> |
||
77 | </html> |
||
78 |