Erro de paginação no IE usando jquery

0 respostas
P

Boa tarde pessoal!

Estou com um problema de paginação no IE. A página exibe todos os elementos da lista de uma vez e os botões de próximo e anterior não funcionam…

No Chrome e no FF funciona mas em qualquer IE a paginação não funciona de jeito algum… Já tentei mudar a versão do jquery e do jqueryui para as mais antigas e para as mais novas, mas tb não adiantaou… Se alguém souber, por favor me dê um help!!!

Uso java com struts, jquery(1.7.1) e jqueryui (1.8.6)

O javascript com a chamada do jquery e do jqueryui no meu jsp estão abaixo.

<%@ page language="java" contentType="text/html; charset=ISO-8859-1"
pageEncoding="ISO-8859-1"%>
<%@ taglib uri="/struts-tags" prefix="s" %>
<%@ taglib uri="http://java.sun.com/jsp/jstl/core" prefix="c" %>
<%@ taglib uri="http://java.sun.com/jsp/jstl/fmt" prefix="fmt" %>
<%@ taglib uri="http://java.sun.com/jsp/jstl/functions" prefix="fn" %>

<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1">

<title>Página Principal</title>

<jsp:include page="css.jsp" />
<link rel="stylesheet" href="css/jquery.tablesorter.css" type="text/css">

<link href="http://ajax.googleapis.com/ajax/libs/jqueryui/1.8.6/themes/redmond/jquery-ui.css" rel="stylesheet" type="text/css"/> 

<script type="text/javascript" src="http://www.google.com/jsapi"></script>

<script type="text/javascript">

google.load("jquery", "1.7.1");
google.load("jqueryui", "1.8.6");

function initialize(){ 
$(".datepicker").datepicker({
dateFormat: 'dd/mm/yy',
dayNames: ['Domingo', 'Segunda', 'Terça', 'Quarta', 'Quinta', 'Sexta', 'Sábado'],
monthNames: ['Janeiro', 'Fevereiro', 'Março', 'Abril', 'Maio', 'Junho', 'Julho', 'Agosto', 'Setembro', 'Outubro', 'Novembro', 'Dezembro'],
prevText: 'Anterior',
nextText: 'Próximo',
dayNamesMin: ['Do', 'Se', 'Te', 'Qu', 'Qu', 'Se', 'Sa']
});

$.getScript("js/jquery.tablesorter.min.js", function(){
$.getScript("js/jquery.tablesorter.pager.js", function(){
$(document).ready(function(){ 
$("#search").tablesorter(); 
$("#search").tablesorterPager({container: $("#pager")}); 
});
});
});

$(".datepicker").change(function(){
var datePicker = new Array();
$(".datepicker").each(function(index){
datePicker[index] = $(this).datepicker( "getDate");
});
if (datePicker[0] != null && datePicker[1] != null){
var start = new Date(datePicker[0]);
var end = new Date(datePicker[1]);
var diff = new Date(end - start);
var days = diff/1000/60/60/24;
if (days < 0 || days > 30){
$('input[name="perFinal"]').val("");
var msg;
if (days < 0){
msg = "A data final não pode ser menor que a data inicial.";
} else {
msg = "O intervalo máximo é de 30 dias.";
}
$("#dataHelper").html(msg);
$("#dataHelper").show(1000);
} else {
$("#dataHelper").hide();
}
} else {
$("#dataHelper").hide();
}
});

$("#listar").click(function(){
window.location='Search.action'; 
});

$(".menu-pesquisa li").click(function () {
verify(this);
});

disableMenuPesquisa(undefined);

$.getScript("js/jquery.numeric.js", function(){
$('input[name="protocoloUnico"]').numeric();
});

$("form").submit(valideForm);

$.getScript("js/getParameterByName.js", function(){
$(document).ready(function(){ 
$('[name="protocoloUnico"]').val(getParameterByName('protocoloUnico'));
$('[name="perInicial"]').val(getParameterByName('perInicial'));
$('[name="perFinal"]').val(getParameterByName('perFinal'));

select = ($('[name="perInicial"]').val())?$(".second"):$(".first");
verify(select);
});
});

<jsp:include page="js/sair.js" />
}
google.setOnLoadCallback(initialize); 

function disableMenuPesquisa(except){
$(".menu-pesquisa li").each(function (index){
if ($(except) != $(this)){
$(this).children("input").attr('disabled', 'disabled');
$(this).children(".habilitar").show(100);
}
});
$(".alert").hide();
}

function verify(li) {
if($(li).children("input").val() != undefined){
if (eval($(li).children("input").attr('disabled'))){
disableMenuPesquisa(this);
$(li).children("input").removeAttr('disabled');
$(li).children(".habilitar").hide();
}
}
}

function valideForm(){
var hasFieldsEmpty = false;
$('input[required="required"]:enabled').each(function (index){
var empty = $(this).val() == "";
if (empty) {
var alert = $(this).parent().children(".alert");
alert.html("Campo obrigatório!");
alert.show(1000);
hasFieldsEmpty = empty || hasFieldsEmpty;
}
});
return !hasFieldsEmpty;
}
google.setOnLoadCallback(initialize); 
</script>
</head>

Quem puder dar uma força agradeço mto!!!

Vlw

Criado 24 de outubro de 2012
Respostas 0
Participantes 1