]> matita.cs.unibo.it Git - helm.git/blob - helm/searchEngine/html/expr.html
291b40cc287983c85c4a6d0b43cfadc3fd7c1a9e
[helm.git] / helm / searchEngine / html / expr.html
1 <HTML>
2 <HEAD>
3 <SCRIPT language="Javascript">
4 function choice()
5         {
6 with (document.form1) { 
7         stadd="";top.qw.document.close();quanti=0;
8         if (selopt[0].checked) {stadd="\[Genid]"+document.form1.ex1.value+"[Expr].[Expr]"}
9         if (selopt[1].checked) {stadd="![Genid]:[Expr].[Expr]"}
10         if (selopt[2].checked) {stadd="[Expr]-&gt;[Expr]"}
11         if (selopt[3].checked) {stadd="([Expr])-&gt;[Expr]"}
12         if (selopt[4].checked) {stadd=document.form1.ex2.value}
13         if (selopt[5].checked) {
14                                 while (quanti<1)
15                                         {
16                                         quanti=prompt("How many expressions in the list?","1");//alert(quanti);
17                                         if (isNaN(quanti)){quanti=0;}
18                                         }
19                                 stadd="(";
20                                 for (i=0;i<Math.floor(quanti);i++)
21                                 {stadd=stadd+"[Expr] "}
22                                 stadd=stadd+")";
23                                }
24         parent.mcq=parent.mcq.replace("<font color=\"#ff0000\">[Expr]</font>",stadd);
25         //top.qw.document.write(parent.mcq);
26         parent.parse(parent.mcq);
27                         }
28         }
29 </SCRIPT>
30 </HEAD>
31 <BODY>
32 You are entering an expression. Select one of the following.
33 <form name="form1" action="Javascript:choice();" method="get">
34 <input type="radio" name="selopt">\[Genid]<select name="ex1" onFocus="selopt[0].checked=true;">
35 <option value=":">:
36 <option value=":=">:=
37 </select>[Expr].[Expr] <br>
38 <input type="radio" name="selopt">![Genid]:[Expr].[Expr] <br>
39 <input type="radio" name="selopt">[Expr]-&gt;[Expr]<br>
40 <input type="radio" name="selopt">([Expr])-&gt;[Expr]<br>
41 <input type="radio" name="selopt"> <select name="ex2" onFocus="selopt[4].checked=true;">
42 <option value="Prop"> Prop 
43 <option value="Set"> Set
44 <option value="Type"> Type
45 <option value="?"> ?
46 </select> <br>
47 <input type="radio" name="selopt"> ( [Expr list] ) <br>
48 <input type=submit value="Select">
49 </form>
50 </BODY>
51 </HTML>