I am having problems with an ajax form idea.
I submit the form (jquery, jquery.form by malsup) thats all fine
So on my page i have
<form is inside its own div to add a new record for the user so it would be
user record 5 in this example>
<li user record 1>
<li user record 2>
<li user record 3>
<li user record 4>
When i submit the form if it saves i need the new data to append to the
users li but if it does not save i need the form to be shown with the
errors. I have it all working using javascript validation so the form always
saves and apends the data fine but i want to get rid of the javascript
validation so if it saves append if it does not save return the form with
the errors from cake. I have tried Miles Ajax_component returning true or
false to the javascript to direct which way to procede but i have no clue
how to return the views of either success or failed save.
Basically if it saved update user div if it does not save update the form
div
I alert(response) in the javascript and get:
{"success":false}
<div class="set">
.....
all my view code as normal
</div>
Which displays the view but with the {"success":false} above the view.
Any ideas / directions / tips.
Thanks
Dave
Check out the new CakePHP Questions site http://cakeqs.org and help others with
their CakePHP related questions.
You received this message because you are subscribed to the Google Groups
"CakePHP" 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