]> matita.cs.unibo.it Git - helm.git/commitdiff
* topurl was re-declared and used with two different meanings ==> renamed
authorClaudio Sacerdoti Coen <claudio.sacerdoticoen@unibo.it>
Thu, 17 Apr 2003 09:44:25 +0000 (09:44 +0000)
committerClaudio Sacerdoti Coen <claudio.sacerdoticoen@unibo.it>
Thu, 17 Apr 2003 09:44:25 +0000 (09:44 +0000)
  the first occurrence into interface_topurl
* the r.e. that extract the topurl from the URL has been fixed

helm/searchEngine/html/index.html

index 7fd3824c185a5e221f81f1f820af02a335b699c8..9182d26a6f7ba1f64dbec416ed8ad39c06b5b04c 100644 (file)
@@ -65,7 +65,7 @@ var thinterfaceURL="@thinterfaceURL@";
 var CICURI="@CICURI@";
 var naturalLanguage="@naturalLanguage@";
 var annotations="@annotations@";
-var topurl="@topurl@";
+var interface_topurl="@topurl@";
 
 function ask_uwobo(url)
        {
@@ -92,7 +92,7 @@ function ask_uwobo(url)
                          "&param.CICURI=" + escape(CICURI) +
                          "&param.naturalLanguage=" + escape(naturalLanguage) +
                          "&param.annotations=" + escape(annotations) +
-                         "&param.topurl=" + escape(topurl) +
+                         "&param.topurl=" + escape(interface_topurl) +
                          "&prop.method=html"));
        }
 function help(w) // quando invocata, visualizza l' help relativo ad un oggetto. Di solito รจ legata ad un evento onFocus o onMouseOver.  
@@ -447,8 +447,12 @@ function aggq() // aggiorna la query sostituendo l' ultimo link editato con la s
        aggcw();
        cw.focus();
        }
-var topurl=document.location.protocol+'//'+document.location.host;
-//var topurl="";
+var re1 = /(.*)\?.*/;
+var re2 = /(.*)\/.*/;
+var topurl=document.location+"";
+topurl = topurl.replace(re1,"$1");
+topurl = topurl.replace(re2,"$1");
+//var topurl=document.location.protocol+'//'+document.location.host;
 var action="/getpage?url=";
 //var action="";