Salve, scusatemi sono ancora io.
Allora, con le api di google ho questo codice:
dove mi escono i risultati, le pagine dei risultati sono 8.Codice:var searchControl;
window.onload = onLoad;
function onLoad() {
searchControl = new GSearchControl();
//SMALL_RESULTSET, LARGE_RESULTSET
searchControl.setResultSetSize(google.search.Search.LARGE_RESULTSET);
//EXPAND_MODE_PARTIAL, EXPAND_MODE_OPEN, EXPAND_MODE_CLOSED
searchOptions = new google.search.SearcherOptions();
searchOptions.setExpandMode(google.search.SearchControl.EXPAND_MODE_OPEN);
var webSrearch = new GwebSearch();
webSrearch.setUserDefinedLabel("myWeb");
searchControl.addSearcher(webSrearch, searchOptions);
var siteSearch = new GwebSearch();
siteSearch.setUserDefinedLabel("Cerca sito");
siteSearch.setSiteRestriction("talkpluginorange.altervista.org/");
searchControl.addSearcher(siteSearch);
var blogsSrearch = new GblogSearch();
blogsSrearch.setUserDefinedLabel("myBlogs");
searchControl.addSearcher(blogsSrearch);
var imgSrearch = new GimageSearch();
imgSrearch.setUserDefinedLabel("myImages");
searchControl.addSearcher(imgSrearch);
var videoSrearch = new GvideoSearch();
videoSrearch.setUserDefinedLabel("myVideo");
searchControl.addSearcher(videoSrearch);
var newsSrearch = new GnewsSearch();
newsSrearch.setUserDefinedLabel("News");
searchControl.addSearcher(newsSrearch, searchOptions);
var drawOptions = new GdrawOptions();
// DRAW_MODE_TABBED, DRAW_MODE_LINEAR
drawOptions.setDrawMode(GSearchControl.DRAW_MODE_TABBED);
drawOptions.setInput(document.getElementById('queryInput'));
searchControl.draw(document.getElementById("searchcontrol"), drawOptions);
inputBlur();
}
var query = null;
document.onkeydown = function(event) { kd(event); };
document.getElementById('queryInput').onfocus = function(event) { inputFocus(event); };
document.getElementById('queryInput').onblur = function(event) { inputBlur(event); };
var searched = false;
function kd(e) {
if (!e) e = event;
if (query == null)
query = document.getElementById('queryInput');
if (e.keyCode == 27) {
query.value = '';
searchControl.clearAllResults();
}
query.focus();
}
function inputFocus() {
var queryInput = document.getElementById('queryInput');
queryInput.style.color = "#555";
if (queryInput.value && queryInput.value == "Cerca qualcosa") {
queryInput.value = "";
}
}
function inputBlur() {
var queryInput = document.getElementById('queryInput');
queryInput.style.color = "#bbb";
if (!queryInput.value) {
queryInput.value = "Cerca sul web";
}
}
Ho sentito in giro che invece che LARGE_ esiste un altro id che invece di 8 pagine ne fa uscire 10. Come potrei fare?
EDIT:
Qualcuno sa come fare? Ho sentito che si possono mettere 10 pagine invece che 8

