]> matita.cs.unibo.it Git - helm.git/blob - helm/searchEngine/html/templateambigpdq2.html
525e69459527cc8d1a2e29f14dd12aef62bfcb7c
[helm.git] / helm / searchEngine / html / templateambigpdq2.html
1 <HTML>
2 <HEAD>
3 <SCRIPT language="Javascript">
4 elenco = new Array(@INTERPRETATIONS@);
5 labels = new Array(@INTERPRETATIONS_LABELS@);
6 function armageddon()
7         {
8         top.initialize();
9         top.window.open(top.topurl+top.action+"start.html","qw");
10         top.window.open(top.topurl+top.action+"blank.html","cw");
11         top.window.open(top.topurl+top.action+"blank.html","hw");
12         top.window.open(top.topurl+top.action+"blank.html","gw");
13         top.window.open(top.topurl+top.action+"blank.html","sw");
14         }
15 function resetta()
16         {
17         if (confirm("This will erase your query and start a new one. Are you sure you want to do this?"))
18                 {armageddon();}
19         }
20 function listainterpretazioni()
21         {
22         for (i=0;i<elenco.length;i++)
23                 {
24       document.write("<input type=radio name=interp value="+elenco[i]+"> "+labels[i]+"<br>"); 
25                 }
26         }
27 function invia()
28         {
29         stringa=top.topurl+"/searchPattern?term="+top.terminecic;
30         stringa=stringa+"&aliases="+(top.listaliases==""?"":"%20");
31         controllo=stringa.length;
32         for (j=0;j<elenco.length;j++)
33                 {
34                 if (document.disamb.interp[j].checked)
35                         {
36                         stringa=stringa+escape(elenco[j]);
37
38       // TODO da implementare nella terza fase
39                         //top.aliasglob[top.aliasglob.length]=document.disamb.interp[j].value;
40
41                         //for (k=0;k<top.aliasglob.length;k++){alert(top.aliasglob[k])}
42                         //top.listaliases=top.listaliases+document.disamb.interp[j].value;//in caso di query ulteriori con la stessa lista di alias
43                         }
44                         
45                 }
46         if (stringa.length!=controllo) 
47                 {
48                 window.open(stringa,"cw");
49                 }
50                 else {alert("You must choose one option.");}
51         } 
52 </SCRIPT>
53 </HEAD>
54 <BODY>
55 <h3>There are more than one possible interpretations.</h3>
56 <br>Please choose one of the following.
57 <br>
58 <form name="disamb">
59 <SCRIPT language="Javascript">listainterpretazioni();</SCRIPT><br>
60 <input type=button value="Ok" onClick="invia();">
61 <input type=button value=Cancel onClick="resetta();">
62 <form>
63 </BODY>
64 </HTML>