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