Submitting a form and closing popup
Posted: Sat Sep 17, 2011 9:57 am
Hello all.
Firstly im not 100% sure if this is the right section on the forum to post under but not am not sure where else to put it so here goes...
I am using GreyBox to launch popups on my website, this all works well the popup is called by
The page that is then loaded into the popup is a page hosted on my server and it simpy displays a form to allow the user to add some data into a database, this is all fine and works perfect. My form code is
My problem is thou because ytou click the submit button from inside the popup, when the create-ex.php action has been run it was suppose to redirect the user back to the homepage displaying all their added data, however now because its being called from inside the popup, the page being shown in the popup is being changed. I need to somehow close the popup and redirect the main page again.
Any ideas ?
Many Thanks =]
Firstly im not 100% sure if this is the right section on the forum to post under but not am not sure where else to put it so here goes...
I am using GreyBox to launch popups on my website, this all works well the popup is called by
Code: Select all
<a href="../pop/create.php" title="Create" rel="gb_page_center[530, 460]">Launch</a>Code: Select all
<form id="new" name="new" action="../scripts/create-ex.php" method="post">
<label class="LoginLabel">Reference:</label>
<br>
<input id="newRef" class="LoginTextArea" type="text" tabindex="1" name="newRef">
<br>
<label class="LoginLabel">Title:</label>
<br>
<input id="newTitle" class="LoginTextArea" type="text" tabindex="1" name="newTitle">
<br>
<input name="" type="submit" value="Create" tabindex="3" class="LoginButton"/><br>
</form>My problem is thou because ytou click the submit button from inside the popup, when the create-ex.php action has been run it was suppose to redirect the user back to the homepage displaying all their added data, however now because its being called from inside the popup, the page being shown in the popup is being changed. I need to somehow close the popup and redirect the main page again.
Any ideas ?
Many Thanks =]