Hi Langdon,
I'm not really an Ajax/Javascript person either, but the way I did it
was having a javascipt function on the submit buttons themselves,
which would serialize the form data, and sent it off to server
action. So each button has it's own javascript which includes the
submit URL - it doesn't get this from the form tag.
$("groups_process_button").onclick = function( event ){
CBAjax.get_json('/groups/process.json',
Form.serialize(Event.element(event).form),
CBGroupsAjax.process_callback);
return false;
}
this is from the javascript that attaches the events to one of our
forms - it looks for the button with id "groups_process_button", and
when this button is clicked it sends the form data to "/groups/
process", with the expectation of JSON in return. The "return false"
is needed to ensure the normal submit button behaviour (if it is a
submit and not just a normal button) is not performed too.
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups "Cake
PHP" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at
http://groups.google.com/group/cake-php?hl=en
-~----------~----~----~----~------~----~------~--~---