Index: other-projects/hathitrust/wcsa/extracted-features-solr/trunk/web-portal/index.html
===================================================================
--- other-projects/hathitrust/wcsa/extracted-features-solr/trunk/web-portal/index.html	(revision 31384)
+++ other-projects/hathitrust/wcsa/extracted-features-solr/trunk/web-portal/index.html	(revision 31385)
@@ -167,5 +167,5 @@
 		<input type="hidden" id="wt" name="wt" value="json"/>
 		<input type="hidden" id="start" name="start" value="0"/>
-		<input type="hidden" id="rows" name="rows" value="25"/>
+		<input type="hidden" id="rows" name="rows" value="20"/>
 		<input type="text"   id="q" name="q" style="width: 600px;"/>
 		<input type="submit" id="search-submit" />
@@ -265,4 +265,7 @@
 -->
 
+                <div id="search-results-anchor"> 
+		</div>
+
 		<fieldset>
 		  <legend style="margin-bottom: 5px; padding-top: 15px;">
Index: other-projects/hathitrust/wcsa/extracted-features-solr/trunk/web-portal/index.js
===================================================================
--- other-projects/hathitrust/wcsa/extracted-features-solr/trunk/web-portal/index.js	(revision 31384)
+++ other-projects/hathitrust/wcsa/extracted-features-solr/trunk/web-portal/index.js	(revision 31385)
@@ -3,4 +3,6 @@
 var langs_with_pos =["en","de","pt","da","nl"];
 var langs_without_pos =["af","ar","bg","bn","cs","el","es","et","fa","fi","fr","he","hi","hr","hu","id","it","ja","kn","ko","lt","lv","mk","ml","mr","ne","no","pa","pl","ro","ru","sk","sl","so","sq","sv","sw","ta","te","th","tl","tr","uk","ur","vi","zh-cn","zh-tw"];
+
+var num_rows = 20;
 
 function lang_pos_toggle(event) {
@@ -39,4 +41,18 @@
 }
 
+function show_new_results(delta)
+{
+    store_search_args.start += delta;
+        
+    $.ajax({
+	type: 'GET',
+	url: store_search_action,
+	data: store_search_args,
+	dataType: 'json',
+	success: show_results,
+	error: ajax_error
+    });
+}
+
 function show_results(jsonData) {
     var response = jsonData.response;
@@ -48,5 +64,7 @@
     if (num_docs>0) {
 	$search_results.html("<p>Results: " + num_found + " volumes/documents matched</p>");
-	$search_results.append("<p>Showing matches: 1-" + num_docs + "</p>");
+	var from = parseInt(store_search_args.start)+1;
+	var to = from + num_rows;
+	$search_results.append("<p>Showing matches: "+from+"-" + to + "</p>");
     }
     else {
@@ -54,4 +72,5 @@
     }
 
+    
     // https://babel.hathitrust.org/cgi/pt?id=hvd.hnnssu;view=1up;seq=11
 
@@ -78,4 +97,17 @@
     }
 
+    document.location.href="#search-results-anchor";
+    
+    var next_prev = '<p style="width:100%;"><div id="search-prev" style="float: left;"><a>&lt; Previous</a></div><div id="search-next" style="float: right;"><a>Next &gt;</a></div></p>';
+    
+    $search_results.append(next_prev);
+    $('#search-prev').click(function(event) { show_new_results(-1*num_rows); });
+    $('#search-next').click(function(event) { show_new_results(num_rows); });
+
+    var search_start = store_search_args.start;
+    if (search_start==0) {
+	$('#search-prev').hide();
+    }
+    
     // Example URL for catalog metadata (multiple items)
     // http://catalog.hathitrust.org/api/volumes/brief/json/id:552;lccn:70628581|isbn:0030110408
@@ -94,9 +126,12 @@
 }
 
+var store_search_args = null;
+var store_search_action = null;
+
 function submit_action(event)
 {
     event.preventDefault();
 
-    var action = $('#search-form').attr("action");
+    store_search_action = $('#search-form').attr("action");
     
     var arg_indent = $('#indent').attr('value');
@@ -157,10 +192,10 @@
     //  q=xxxxen_NOUN_htrctoken:farming
     
-    var args = { q: arg_q, indent: arg_indent, wt: arg_wt, start: arg_start, rows: arg_rows };
+    store_search_args = { q: arg_q, indent: arg_indent, wt: arg_wt, start: arg_start, rows: arg_rows };
     
     $.ajax({
 	type: 'GET',
-	url: action,
-	data: args,
+	url: store_search_action,
+	data: store_search_args,
 	dataType: 'json',
 	success: show_results,
@@ -256,5 +291,8 @@
     for (var i=0; i<langs_without_pos.length; i++) {
 	var lang = langs_without_pos[i];
-	$other_langs.append('<input type="checkbox" name="'+lang+'-enabled" id="'+lang+'-enabled" />');
+	//var labeled_checkbox = '<span style="white-space:nowrap;">\n';
+	var labeled_checkbox = '<nobr>';
+	
+	labeled_checkbox += '<input type="checkbox" name="'+lang+'-enabled" id="'+lang+'-enabled" />';
 	/*
 	if (lang === "zh-cn") {
@@ -271,5 +309,9 @@
 	var opt_title = (lang_full !== lang_native_full) ? 'title="'+lang_native_full+'"' : "";
 	
-	$other_langs.append('<span style="padding-right: 10px;" ' + opt_title + '>'+lang_full+'</span> ');
+	labeled_checkbox += '<label for="'+lang+'-enabled" style="padding-left: 5px; padding-right: 10px;" ' + opt_title + '>'+lang_full+'</label>';
+	//labeled_checkbox += '</span>\n';
+	labeled_checkbox += '</nobr> ';
+	
+	$other_langs.append(labeled_checkbox);
 	
     }
