]> matita.cs.unibo.it Git - helm.git/blob - helm/searchEngine/html/templateambigpdq1.html
Many changes in the client-side interfaces:
[helm.git] / helm / searchEngine / html / templateambigpdq1.html
1 <HTML>
2 <HEAD>
3 <TITLE>@TITLE@</TITLE>
4 <SCRIPT language="Javascript">
5 var ambiguousinput="@MSG@";
6 var elenco = new Array(@CHOICES@);
7 var id = "@ID@";
8 function armageddon()
9         {
10         top.initialize();
11         top.window.open(top.topurl+top.action+"start.html","qw");
12         top.window.open(top.topurl+top.action+"blank.html","cw");
13         top.window.open(top.topurl+top.action+"blank.html","hw");
14         top.window.open(top.topurl+top.action+"blank.html","gw");
15         top.window.open(top.topurl+top.action+"blank.html","sw");
16         }
17 function resetta()
18         {
19         if (confirm("This will erase your query and start a new one. Are you sure you want to do this?"))
20                 {armageddon();}
21         }
22 function listauri()
23         {
24         for (i=0;i<elenco.length;i++)
25                 {
26                 document.write("<input type=checkbox name=uricheck value="+elenco[i]+"> "+elenco[i]+"<br>"); 
27                 }
28         }
29 function invia()
30         {
31         vecchiavlds=top.vlds.length;
32         stringa=top.topurl+"/searchPattern?term="+top.terminecic;
33         stringa=stringa+"&aliases="+top.listaliases;
34         stringa=stringa+"&choices=";
35   var choices = "";
36         top.vlds[top.vlds.length]=id;
37         for (j=0;j<elenco.length;j++)
38                 {
39                 if (document.disamb.uricheck[j].checked)
40                         {
41                         top.vlds[top.vlds.length]=document.disamb.uricheck[j].value;
42                         }
43                 }
44         top.vlds[top.vlds.length]=";";
45         for (j=0;j<top.vlds.length;j++)
46                 {
47     choices=choices+(top.vlds[j]==";"?";":escape(top.vlds[j]))+" ";
48                 //if (j!=top.vlds.length-1) {stringa=stringa+","}
49                 }
50         choices=choices.substring(0,choices.length-2);
51   stringa=stringa+escape(choices);
52         if (top.vlds.length==vecchiavlds){alert("You must select at least one of the options.");}
53                 else
54                 {
55                 window.open(stringa,"cw");
56                 }
57         } 
58   function selezionaCostanti() {
59     for (i=0; i<elenco.length; i++) {
60       if (elenco[i].substring(elenco[i].length-4, elenco[i].length) != ".var") {
61         document.disamb.uricheck[i].checked = true;
62       } else {
63         document.disamb.uricheck[i].checked = false;
64       }
65     }
66   }
67 </SCRIPT>
68 </HEAD>
69 <BODY>
70 <h3><SCRIPT language="Javascript">document.write(ambiguousinput);</SCRIPT></h3>
71 <br>Please select one or more of the following.
72 <br>
73 <form name="disamb">
74 <SCRIPT language="Javascript">listauri();</SCRIPT><br>
75 <input type=button value="Ok" onClick="invia();">
76 <input type=button value="Constants Only" onClick="selezionaCostanti();">
77 <input type=button value=Cancel onClick="resetta();">
78 <form>
79 </BODY>
80 </HTML>