Mi sono studiato un pò quelle stringhe... Comunque continua a dar errore.
Ti riporto parte del codice, magari ci dai un'occhiata, sono esausto! Ho provato in tutti i modi!:
Codice:
$("#result1, #result2, #result3, #result4, #result5, #result6, #result7, #result8, #result9, #result10").html('');
$("#news_total").html("");
$("#page_navigation").html("");
$("#page").html("");
if(response.SearchResponse.Web.Results.length>0)
{
$("#page").html('Pagina <b>'+page+'</b>');
$("#news_total").html("Risultati Totali <b>"+response.SearchResponse.Web.Total+"</b><?php
/**
* Simple function to replicate PHP 5 behaviour
*/
function microtime_float()
{
list($usec, $sec) = explode(" ", microtime());
return ((float)$usec + (float)$sec);
}
$time_start = microtime_float();
// Sleep for a while
usleep(100);
$time_end = microtime_float();
$time = $time_end - $time_start;
echo "Tempo: $time seconds\n";
?>");
//how much items per page to show
var show_per_page = perPage;
var show_per_page_image = perPageImage;
var show_per_page_news = perPageNews;
var show_per_page_video = perPageVideo;
//getting the amount of elements inside content div
//var number_of_items = $('#content').children().size();
var number_of_items = parseInt(response.SearchResponse.Web.Total);
if (number_of_items>100000) number_of_items=100000;
//calculate the number of pages we are going to have
var number_of_pages = Math.ceil(number_of_items/show_per_page);
//set the value of our hidden input fields
$('#current_page').val(page);
$('#show_per_page').val(show_per_page);
$('#show_per_page_image').val(show_per_page_image);
$('#show_per_page_news').val(show_per_page_news);
$('#show_per_page_video').val(show_per_page_video);
//now when we got all we need for the navigation let's make it '
/*
what are we going to have in the navigation?
- link to previous page
- links to specific pages
- link to next page
*/
//var navigation_html = '<a class="previous_link" href="javascript:previous();">Prev</a>';
var navigation_html ='';
var num_dec='"'+(page/show_per_page)+'"';
if (num_dec.indexOf(".") == (-1)){
//registro il cookie
createCookie('numPage',page,0);
}