- Timestamp:
- 2010-12-07T17:05:38+13:00 (13 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
main/trunk/greenstone3/web/interfaces/oran/js/gui_div.js
r23360 r23405 11 11 //console.log(formatStatement); 12 12 13 // find collection name 14 15 var myurl = document.URL; 16 console.log(myurl); 17 var first = myurl.indexOf("&c")+3; 18 var last = myurl.indexOf("&", first); 19 20 var collection_name = myurl.substring(first,last); ///&c=(.*)&/.exec(myurl); 21 console.log(collection_name); 22 23 first = myurl.indexOf("&s")+3; 24 last = myurl.indexOf("&", first); 25 26 var service_name = myurl.substring(first,last); 27 console.log(service_name); 28 29 var classifier_name = null; 30 31 if(service_name == "ClassifierBrowse") 32 { 33 first = myurl.indexOf("&cl")+4; 34 last = myurl.indexOf("&", first); 35 36 classifier_name = myurl.substring(first,last); 37 console.log(classifier_name); 38 } 13 39 14 40 //var myurl = 'http://localhost:8080/greenstone3/format?a=s&sa=s&t='+formatStatement; … … 17 43 18 44 // How do I find out my collection name? 19 20 $.post("http://localhost:8080/greenstone3/format?a=f", {data: formatStatement}, function(data) { 45 var post_url = "http://localhost:8080/greenstone3/format?a=f&c=" + collection_name +"&s=" + service_name; 46 47 if(classifier_name != null) 48 post_url = post_url + "&cl=" + classifier_name; 49 50 $.post(post_url, {data: formatStatement}, function(data) { 21 51 //$('.result').innerHTML = data; //html(data); 22 52 console.log("Success, we have received data");
Note:
See TracChangeset
for help on using the changeset viewer.