Ver Mensaje Individual
  #1 (permalink)  
Antiguo 01/06/2013, 05:44
johannis24
 
Fecha de Ingreso: junio-2013
Mensajes: 1
Antigüedad: 10 años, 11 meses
Puntos: 0
valida y no continua

Buen dia a todos

Tengo el siguiente codigo que estoy trabajando, pero al validar se me va a la pagina principal, no encuentro el problema, aqui va el codigo, estoy usndo ajax, javascript, php y mysql.

$(document).ready(function () {

$("#buttonregistro").button();
$("#buttonLimpiarInformacion").button();

$("#registro").validate({
errorClass: "warning",
onkeyup: false,
onblur: false,
submitHandler: function () {
createCancelDialogregistro(request);
}
});
});

function createCancelDialogregistro(request) {
clearDialog();
var contenido = document.getElementById("dialog-content");
var div = document.createElement("div");
div.appendChild(document.createTextNode("Desea continuar procesando la informacion"));
contenido.appendChild(div);
$("#dialog").dialog({
title: Titleregistro,
resizable: true,
draggable: true,
buttons: {
"No": function () {
$(this).dialog("close");
},
"Si": function () {
procesarregistro(request);
$(this).dialog("close");
}
}
});
}

function procesarregistro(request) {
Procesarinf = $.ajax({
url: querys.php,
type: "POST",
data: request,
beforeSend: function () {
showDisplay('registro-content', 'loading-registro');
},
error: function () {
document.getElementById("registro").reset();
createDialog(Titleregistro, "Error de sistema, por favor intentelo nuevamente.");
},
success: function (datos) {
if (datos == "OK") {
document.getElementById("registro").reset();
createDialog(Titleregistro, "todo fue cargado con exito.");
} else {
createDialog(Titleregistro, datos);
}
},
complete: function () {
showDisplay('loading-registro','registro-content');
}
});
}