I have a form that I want to submit and show in Colorbox.
Form - Mals Ecommerce View Cart.
See: https://www.mals-e.com/tpv.php?tp=4
I want it to display the contents of the cart in the iframe colorbox. Can this be used using the FORM method rather than the Link method?
here is the best answer.
add this to your submitbutton: id = "SearchButton"
then use this:
$(document).ready(function() { $("input#SearchButton").colorbox({href: function(){ var url = $(this).parents('form').attr('action'); var ser = $(this).parents('form').serialize(); //alert(url+'?'+ser); return url+'?'+ser; }, innerWidth:920, innerHeight:"86%", iframe:true}); });
test at: http://wwww.xaluan.com or http://wwww.xaluan.com/raovat/
, :
$("#submit_button").click(function () { // ATTACH CLICK EVENT TO MYBUTTON $.post("/postback.php", // PERFORM AJAX POST $("#info_form").serialize(), // WITH SERIALIZED DATA OF MYFORM function(data){ // DATA NEXT SENT TO COLORBOX $.colorbox({ html: data, open: true, iframe: false // NO FRAME, JUST DIV CONTAINER? }); }, "html"); });
.. Colorbox jQuery. , -.
Try
$("input#formsubmit").colorbox({title: function(){ var url = $(this).parents('form').attr('action'); }});
, Colorbox. "formubmit" .
colorbox , :
jQuery.colorbox({href:, iframe: true, opacity: 0.6, innerWidth: 760, innerHeight: 420, title:});
jQuery ( "document" ). ready (function() {jQuery.colorbox..});
u , . . ., .
jQuery.colorbox()
Source: https://habr.com/ru/post/1739480/More articles:Differences between IE7 and Firefox / Opera / Chrome - htmlLooking for a free tool for visualizing object relationships for C # - .netLaunch Django as a Windows Service - djangoPriority Queue Option - c ++Export TFS 2008 groups and permissions (Team Foundation Server) - security/ SUBSYSTEM: Windows program will not write on the command line - command-lineHow do I get PowerShell to run the original Start-Process cmdlet rather than the PSCX Start-Process cmdlet? - powershell.NET. Как скопировать файлы с помощью диалогового окна "Копировать файлы" в Windows - windowsWhat languages does the while-else type management structure have and how does it work? - programming-languages | fooobar.comMultiselect Form field in PDF - pdf-formAll Articles