Subversion Repositories wimsdev

Rev

Rev 3653 | Go to most recent revision | Show entire file | Ignore whitespace | Details | Blame | Last modification | View Log | RSS feed

Rev 3653 Rev 4034
Line 1... Line 1...
1
<html>
1
<html>
2
    <body bgcolor=#ffffff onload="javascript:SetSize('TexApp');">
2
    <body bgcolor=#0000ff onload="javascript:setTimeout('SetSize(\'TexApp\')',2000);">
3
        <script type="text/javascript">                                                
3
        <script type="text/javascript">                                                
4
       
-
 
5
       
-
 
6
       
-
 
7
        function remove(t){
4
        function remove(t){
8
            document.getElementById(t).width = 1;
5
            document.getElementById(t).width = 1;
9
            document.getElementById(t).height = 1;     
6
            document.getElementById(t).height = 1;     
10
        }
7
        }
11
                                                               
8
                                                               
12
        function SetSize(t){                        
9
        function SetSize(t){                        
13
            var size = new Array(2);
10
            var xsize,ysize;
-
 
11
            try{
14
            size = document.getElementById(t).getPrefferedSize();
12
                xsize = document.getElementById(t).getPrefferedWidth();
-
 
13
                ysize = document.getElementById(t).getPrefferedHeight();
15
            document.getElementById(t).width = size[0];
14
                document.getElementById(t).width = xsize;
16
            document.getElementById(t).height = size[1];
15
                document.getElementById(t).height = ysize;
17
            document.getElementById('showme').innerHTML='<hr><font color=red><b>preffered height = '+size[1]+'<br>preffered width = '+size[0]+'</b></font>';
16
                document.getElementById('showme').innerHTML='<hr><font color=red><b>preffered height = '+xsize+'<br>preffered width = '+ysize+'</b></font>';
18
           
17
            }
-
 
18
            catch(e){
-
 
19
                document.getElementById('showme').innerHTML='<hr><font color=red><b>Your browser does not support automatic resizing...</b></font>';
19
        }
20
            }    
-
 
21
       
-
 
22
        }
20
        function ReadApplet(t){                        
23
        function ReadApplet(t){                        
21
            var reply = document.getElementById(t).ReadApplet();
24
            var reply = document.getElementById(t).ReadApplet();
22
            document.getElementById('showme').innerHTML='<hr><font color=red><b>'+reply+'</b></font>';
25
            document.getElementById('showme').innerHTML='<hr><font color=red><b>'+reply+'</b></font>';
23
        }
26
        }
24
       
-
 
25
        function ExtraInput(t){
-
 
26
            document.getElementById('TexApp').changeInputfields(t);
-
 
27
        }
-
 
28
        </script>
27
        </script>
29
        <div id="showme"></div>
28
        <div id="showme"></div>
30
        <table ><tr valign=middle ><th>
29
        <table ><tr valign=middle ><th>
31
        <font color=red>
30
        <font color=red>
32
        this is some text...
31
        this is some text...
33
        </font>
32
        </font>
34
        </th>
33
        </th>
35
        <th>
34
        <th>
36
        <applet id="TexApp" codebase="dist" archive="TexApp.jar" code="TexApp.class" width="1" height="1">
35
        <applet id="TexApp" codebase="dist" archive="TexApp.jar" code="TexApp.class" width="1" height="1"><!-- automatic resizing -->
-
 
36
            <param name="latex0" value="#ffffff,\frac{4}{7} \cdot,#a0c0f0, \frac{3}{4} \: =\:,input,\:\approx\:,input">
37
            <param name="latex_bgcolor" value="#ffffff"><!-- r,g,b default white -->
37
            <param name="latex1" value="vspace"><!-- a blanc line : 50% of inputheight -->
38
            <param name="latex_fgcolor" value="#000000"><!-- r,g,b default black -->
38
            <param name="latex2" value="#00ccff"><!-- change latex fgcolor -->
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 -->                                
39
            <param name="latex3" value="\left[ \begin{array}{l} x = \frac{3}{4} \\ y = \frac{5}{6}\end{array}\right. \rightarrow \frac{x}{y} = ,input">
40
            <param name="latex_fontsize" value="18"><!-- r,g,b default black -->
40
            <param name="latex4" value="#00af0f">
41
           
-
 
-
 
41
            <param name="latex5" value="#ff00ff,\left\{ \begin{array}{l} x = \frac{3}{4} \\ y = \frac{5}{6} \\ z = \frac{\pi}{\sqrt{2}}\end{array}\right \rightarrow \frac{x}{y} = ,input,\rightarrow,#ffffff, z \cdot \frac{x}{y} = ,input">
42
            <!-- optional inputfield after the latex image -->
42
            <!-- optional -->
43
            <param name="status" value="done"><!-- string : wims variable $status  done/waiting -->
43
            <param name="status" value="waiting"><!-- string : wims variable $status  done/waiting -->
-
 
44
            <param name="latex_bgcolor" value="0,0,255"><!-- rgb or #ffffff default white -->
-
 
45
            <param name="latex_fgcolor" value="255,0,0"><!-- rgb or #ffffff  default black -->
44
            <param name="inputfields" value="3"><!-- int : optional : default 0 : number of inputfields on top of eachother-->
46
            <param name="latex_fontsize" value="18"><!-- rgb  or #ffffff  default black -->
45
            <param name="inputfield_width" value="120"><!-- int : default 10 : width in px of inputfield-->
47
            <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-->
48
            <param name="inputfield_height" value="40"><!-- optional int : default fontsize in px : height in px of inputfield-->
47
            <param name="inputfield_fontsize" value ="18"><!-- int : default 10 -->
49
            <param name="inputfield_fontsize" value ="16"><!-- int : default 10 -->
48
            <param name="inputfield_bgcolor" value="0,0,255"><!-- r,g,b default white -->
50
            <param name="inputfield_bgcolor" value="0,0,255"><!-- rgb or #ffffff  default white -->
49
            <param name="inputfield_fgcolor" value="255,0,0"><!-- r,g,b default black -->
51
            <param name="inputfield_fgcolor" value="255,0,0"><!-- rgb or #ffffff  default black -->
50
            <param name="inputfield_editable" value="1,1,1"><!-- field 1 is editable, field 2 is editable... default all editable -->
52
            <param name="inputfield_editable" value="1,0,1"><!-- field 1 is editable, field 2 is not_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" -->
53
            <param name="inputfield_values" value="12,44,"><!--  optional for correct answers: field 1 = "12", field 2 = "44" field3= "" field4 = "22" -->
52
            NO JAVA
54
            NO JAVA
53
        </applet>
55
        </applet>
54
        </th>
56
        </th>
55
        <th>
57
        <th>
Line 61... Line 63...
61
        <font color=white>
63
        <font color=white>
62
        For applet autoscaling, the applet_tag "width" should be less than 10 : width="1"<br>
64
        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>
65
        The autoscaling SetSize() javascript_function could be called from the htmlpage "body onload".<br>
64
        Or in WIMS:<br>
66
        Or in WIMS:<br>
65
        !set wims_html_onload=javascript:SetSize('TexApp');
67
        !set wims_html_onload=javascript:SetSize('TexApp');
-
 
68
        <br>
-
 
69
        This will probably not work for Opera browsers...
-
 
70
        <br>
-
 
71
        Safari on Windows will incorrectly scale the applet...
66
        <br>
72
        <br>
67
        If the applet has a width &gt; 10 , no autoscaling is performed.
73
        If the applet has a width &gt; 10 , no autoscaling is performed.
68
        </font>
74
        </font>
69
        <br>
75
        <br>
70
        <input type="button" name="ReadApplet()" value="ReadApplet()" onclick="javascript:ReadApplet('TexApp');">
76
        <input type="button" name="ReadApplet()" value="ReadApplet()" onclick="javascript:ReadApplet('TexApp');">
71
        <input type="button" name="SetSize()" value="SetSize()" onclick="javascript:SetSize('TexApp');">
77
        <input type="button" name="SetSize()" value="SetSize()" onclick="javascript:SetSize('TexApp');">
72
        <input type="button" name="remove()" value="remove()" onclick="javascript:remove('TexApp');">
78
        <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>
79
    </body>
77
</html>
80
</html>
78
 
81