]> matita.cs.unibo.it Git - helm.git/blob - helm/searchEngine/html/expr.html
Many changes in the client-side interfaces:
[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         if (selopt[6].checked) {
25                                 stadd=document.form1.id_or_uri.value;
26                                 //alert(stadd.substring(0,5));
27                                 if (stadd.substring(0,5)=="cic:/") 
28                                         {if (!parent.uricheck(stadd)){stadd="";}}
29                                 else if (!parent.idcheck(stadd)){stadd="";}                                     
30                                 }
31         if (stadd!="") {parent.mcq=parent.mcq.replace("<font color=\"#ff0000\">[Expr]</font>",stadd);
32         //top.qw.document.write(parent.mcq);
33         parent.parse(parent.mcq);}
34                         }
35         }
36 </SCRIPT>
37 </HEAD>
38 <BODY>
39 You are entering an expression. Select one of the following.
40 <form name="form1" action="Javascript:choice();" method="get">
41 <input type="radio" name="selopt">\[Genid]<select name="ex1" onFocus="selopt[0].checked=true;">
42 <option value=":">:
43 <option value=":=">:=
44 </select>[Expr].[Expr] <br>
45 <input type="radio" name="selopt">![Genid]:[Expr].[Expr] <br>
46 <input type="radio" name="selopt">[Expr]-&gt;[Expr]<br>
47 <input type="radio" name="selopt">([Expr])-&gt;[Expr]<br>
48 <input type="radio" name="selopt"> <select name="ex2" onFocus="selopt[4].checked=true;">
49 <option value="Prop"> Prop 
50 <option value="Set"> Set
51 <option value="Type"> Type
52 <option value="?"> ?
53 </select> <br>
54 <input type="radio" name="selopt"> ( [Expr list] ) <br>
55 <input type="radio" name="selopt"> <input name="id_or_uri" type="text" onFocus="selopt[6].checked=true;top.help(-10)"><br>
56 <input type=submit value="Select">
57 </form>
58 </BODY>
59 </HTML>