Warning: file_get_contents(/data/phpspider/zhask/data//catemap/2/jquery/75.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
Php 将表单发布到Color Box iframe,并在iframe中打开结果_Php_Jquery_Html_Ajax_Colorbox - Fatal编程技术网

Php 将表单发布到Color Box iframe,并在iframe中打开结果

Php 将表单发布到Color Box iframe,并在iframe中打开结果,php,jquery,html,ajax,colorbox,Php,Jquery,Html,Ajax,Colorbox,我有一张表格 <form method="POST" action="qwerty.php" /> <input type="text" name="merchant" /> <input type="text" name="password" /> <input type="submit" value="go" /> </form> 我想做的是将这些值发布到这个php中,并在模式窗口中自己打开结果或响应。这可能吗?有什么帮

我有一张表格

<form method="POST" action="qwerty.php" />

<input type="text" name="merchant" />
<input type="text" name="password" />

<input type="submit" value="go" />

</form>


我想做的是将这些值发布到这个php中,并在模式窗口中自己打开结果或响应。这可能吗?有什么帮助吗?

编辑:

通过使用Ajax和jquery,可以实现如下目的:

var merchant = $('form input:nth-child(1)').val();
var password= $('form input:nth-child(2)').val();

$('form input[type="submit"]').click(function() {
  $.post( "qwerty.php", { merchant: merchant, password: password }, function(data) {
    // #extraDiv is a div with display:none that will serve as a wrapper for the data
    $('#extraDiv').html(data).colorbox();

  });
});
然后在qwerty.php中提取您发送的值:

$merchant = $_POST['merchant'];
$password= $_POST['password'];

我对colorbox不太熟悉,但上面的方法可能有用。

我不想弹出警报!我想使用ajax在颜色框iframe中打开响应