简体   繁体   English

Facebook,在新窗口中发布用于链接和表格的标签

[英]Facebook, Tabs posting in new window for links and FORM

I have built a Facebook tab application (PHP/JS), which consists of a form which posts to a database. 我建立了一个Facebook选项卡应用程序(PHP / JS),该应用程序包含一个发布到数据库的表单。 However whenever POSTing this will force open a new window and display the rest of the app there. 但是,无论何时发布,都将强制打开一个新窗口,并在那里显示应用程序的其余部分。 Links also behave in this manor and are forced to leave the tabbed iframe in a new window. 链接也会在该庄园中起作用,并被迫将带标签的iframe保留在新窗口中。

How do I keep this inside the app? 如何将其保留在应用程序中? So form POST to the DB, but not leave the iframe 因此,将POST形式发送到数据库,但不要离开iframe

<form id="form1" method="post" action="submit.php" >
......
</form>

Then the submit.php once posted entries to DB will do something like 然后,submit.php一旦将条目发布到数据库,将执行以下操作

header('Location: /thanks.php'); 

I think you are looking for this ? 我认为您正在寻找这个?

<form id="form1" method="post" action="submit.php" target="_self" >
......
</form>

The target="_self" keeps the submit within the iframe. target =“ _ self”将提交保留在iframe中。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM