在facebox中打开表单操作...(php href和form action)

时间:2014-04-18 20:29:09

标签: javascript php html

现在有人如何在脸盒中打开它? (所有都是在php功能中)

 echo "< font class=text16bu-ongreen>&nbsp;".lang("Add Payment")."&nbsp;< /font>< br>< br>";

if ($balance > 0) {
reset($paymentplugins);
while (list($key, $plugin) = each($paymentplugins)) {

echo "< form action=$plugin.php?func=add method=post>< input type=hidden name=currenttotal value= \"".mf("$balance")."\" >";

echo "< input type=hidden name=cfirstname value=\"$cfirstname\" >";
echo "< input type=hidden name=ccompany value=\"$ccompany\" >";
echo "< input type=hidden name=caddress value=\"$caddress\"  >";
echo "< input type=hidden name=caddress2 value=\"$caddress2\">";
echo "< input type=hidden name=ccity value=\"$ccity\">";
echo "< input type=hidden name=cstate value=\"$cstate\">";
echo "< input type=hidden name=czip value=\"$czip\">";
echo "< input type=hidden name=cphone value=\"$cphone\">";
echo "< input type=hidden name=cemail value=\"$cemail\">";

echo "< input type=submit class=button value=\"$plugin\"></form>";

在脚本的其余部分,facebox是由rel = facebox调用的,但在这里我不知道该怎么办...

2 个答案:

答案 0 :(得分:0)

将所有代码包裹在<div id="paymentform" style="display:none"></div>

之后,使用facebox打开该div。

<a href="#paymentform" rel="facebox">add payment</a>

答案 1 :(得分:0)

感谢您的回答!

我做了一些有点丑陋的事情,但它的工作方式如下:

$currenttotal=$balance;

if ($balance > 0) {
reset($paymentplugins);
while (list($key, $plugin) = each($paymentplugins)) {


echo "<a href=$plugin.php?func=add&currenttotal=$currenttotal&cfirstname=$cfirstname&ccompany=$ccompany&caddress=$caddress&caddress2=$caddress2&ccity=$ccity&cstate=$cstate&czip=$czip&cphone=$cphone&cemail=$cemail class=button rel=facebox>$plugin </a>";

}

感谢您的帮助!

相关问题