Re: sending a post array via HTML_Ajax
| From: | Joshua Eichorn | Date: | Fri, 17 Feb 2006 16:37:42 +0000 |
| Subject: | Re: sending a post array via HTML_Ajax | ||
| References: | 1 2 3 4 5 6 | Groups: | php.pear.general |
| Request: | Send a blank email to pear-general+get-23036@lists.php.net to get a copy of this message | ||
Dan did you get things too work, so many message I'm not sure whats going on.
As far as detecting what button was clicked, were not the browser so we can't figure that out. You'll need to add some extra onclick code too the buttons to figure that out.
-josh
Dan Rossi wrote:
Yes, to confirm, on mac safari, when posting the form it will still move off the page, even when calling itself, thats with the test examples. On 17/02/2006, at 3:35 PM, Dan Rossi wrote: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:-- PEAR General Mailing List (http://pear.php.net/) To unsubscribe, visit: http://www.php.net/unsub.phpWhere 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