angelusgc Posted June 26, 2012 Share Posted June 26, 2012 Hola compañeros, Les escribo porque estoy intentando crear un pequeño gran plugin y me tiene por la calle de la amargura. La idea es la de enviar a un fichero externo PHP unos valores mediante un formulario creado de forma dinámica y mostrar la interacción con este fichero. En la actualidad lo he conseguido hacer como una ventana Pop-Up, pero no es un método bueno dado la alta usabilidad de los antipopup. Así que he pensado en utilizar fancybox. El código que actualmente tengo funcionando es: var ptu=function(p) { var o = window.open('','"+"','toolbar=0,scrollbars=0,location=0,statusbar=0,menubar=0,width=640,height=480'); var f = o.document.createElement('form'); f.setAttribute('method','post'); f.setAttribute('action','http://WWW.PAGINAWEB.COM/'); for(var k in p) { var d = document.createElement('input'); d.setAttribute('type','hidden'); d.setAttribute('name',k); d.setAttribute('value',p[k]); f.appendChild(d); } o.document.body.appendChild(f); f.submit(); }; x=document.createElement('div'); x.appendChild(window.getSelection().getRangeAt(0).cloneContents()); ptu( { q:x.innerText, u:location.href }); Que como veis, usa la llamada window.open. ¿Alguien tiene alguna idea y me puede echar una mano? Gracias a todos! Link to comment Share on other sites More sharing options...
nadie Posted June 26, 2012 Share Posted June 26, 2012 Aquí hay un modulo que utiliza la libreria fancybox, para unos determinados formularios (login & registrer). (es gratis), quizás te sirva para guiarte por tus dudas. http://www.prestashop.com/forums/topic/171015-modulo-login-register-fancybox-ajax-based/ Link to comment Share on other sites More sharing options...
Recommended Posts