Re: sending a post array via HTML_Ajax
| From: | Dan Rossi | Date: | Fri, 17 Feb 2006 04:35:17 +0000 |
| Subject: | Re: sending a post array via HTML_Ajax | ||
| References: | 1 2 3 4 | Groups: | php.pear.general |
| Request: | Send a blank email to pear-general+get-23019@lists.php.net to get a copy of this message | ||
Hi there, it hasnt worked its posting to the script on a new screen.
To confirm this is the code im using from the example
<form action="products.php" method="post" onsubmit="return !HTML_AJAX.formSubmit(this, 'target');">
where the current script is form.php which is the example.
On 17/02/2006, at 2:59 PM, Joshua Eichorn wrote:
HTML_AJAX.formSubmit submits it a form, so the submit request is sent to the action of the form uses the method that is set (POST or GET). It automatically packages up all the all the elements of a form and the request looks just like a normal form submission to the PHP script. -josh Dan Rossi wrote:Where does it posted to ? All i want it to do is call a class for adding and updating which will then i guess return back to display the updated results ? Or am i posting to a script traditionally and it handles it ? On 17/02/2006, at 2:50 PM, Joshua Eichorn wrote:-- PEAR General Mailing List (http://pear.php.net/) To unsubscribe, visit: http://www.php.net/unsub.phpDan Rossi wrote:hi there, is a way to be able to send post dataa when clicking a button to execute an ajax method ? Do i have to add it into a javascript array myself or what ? Let me know.If you have a form you just just use HTML_AJAX.formSubmit(form,elementToUpdateWithResults) There are other options as well, let me know if that won't work for you. -josh