Ver Mensaje Individual
  #23 (permalink)  
Antiguo 22/07/2010, 14:32
Avatar de mayid
mayid
Colaborador
 
Fecha de Ingreso: marzo-2009
Ubicación: BsAs
Mensajes: 4.014
Antigüedad: 15 años, 1 mes
Puntos: 101
Respuesta: Como puedo cerrar una ventana FancyBox al pulsar un boton submit

Segunda propuesta: usar ajax en vez de iframes (solo si lo anterior fallase).

Cita:
$(document).ready(function() {
$('a.ventana').click(function(){
$.fancybox({
'width' : '42%',
'height' : '72%',
'autoScale' : false,
'transitionIn' : 'none',
'transitionOut' : 'none',
'href' : $(this).attr('href'),
'type' : 'ajax'
});
return false;
});
});
Y ahora sí, usar return false por razones que en un futuro te explicaría.

Cita:
$(document).ready(function() {
$('#elegir').click(function() {
$('#form_envio').submit();
parent.jQuery.fancybox.close();
return false;
});
});