designbuildplay
designbuildplay

Reputation: 67

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. 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.

How do I keep this inside the app? So form POST to the DB, but not leave the iframe

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

Then the submit.php once posted entries to DB will do something like

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

Upvotes: 1

Views: 102

Answers (1)

JeffreyZ
JeffreyZ

Reputation: 566

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.

Upvotes: 2

Related Questions