Re: Open form in new window
| From: | Tim Streater | Date: | Mon, 04 Mar 2013 17:39:00 +0000 |
| Subject: | Re: Open form in new window | ||
| Groups: | php.general | ||
| Request: | Send a blank email to php-general+get-320384@lists.php.net to get a copy of this message | ||
On 04 Mar 2013 at 17:10, John Taylor-Johnston <John.Taylor-Johnston@cegepsherbrooke.qc.ca>
wrote:
> <button type="button" onclick="OpenWindow()">Submit</button>
> will not
> submit the form contents.
Nothing to stop your OpenWindow() function doing a submit as in:
<button type="button"
onclick="OpenWindow(this.form)">Submit</button>
function OpenWindow (formPtr)
{
// Some actions
formPtr.submit ();
}
Personally I never submit forms. I use ajax to communicate with PHP scripts and do something with
the data that is returned by the script. You can see a simple example at http://www.clothears.org.uk
--
Cheers -- Tim