add onChange to your inputs - this function sends the value of the input to
your action

your action responds outputting inform - which you then use to display
information to the user; indicating if the input is acceptable

I would use json - my action would return an array with success (being true
or false), msg (being a string to inform user) and if name is taken an array
of suggestions

If you have cake setup to perform this and that is working - you can use
firebug/dragonfly to test your clientside code; as you tweak and tinker with
the clientside stuff you may need to make small changes to you controller
code

this brief tutorial has some useful and clear advice for what  your trying
to do (turn off debug, autoRender false, requesthandler is Ajax)  - but
instead of echoing a string encode the array response as json and echo that
http://marcgrabanski.com/article/cakephp-ajax-quick-save-jquery


- S



On 7 April 2010 13:39, jamessy <jamesgodw...@googlemail.com> wrote:

> Hi i'm very new to cake so be gentle!
>
> Was hoping some one could point me in the right direction. I have
> built a form which collects data and inserts into database, one of the
> fields checks if that name already exists and throws an error and then
> offers alternate names based on the one they input, now it works fine
> but I would like to do this checking as the user is filling out the
> form so the page doesn't have to refresh. Is there an easy way to do
> this with cake? or what are the best methods to use. Any help would be
> grateful.
>
> Thanks
>
> James
>
> 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 cake-php@googlegroups.com
> To unsubscribe from this group, send email to
> cake-php+unsubscr...@googlegroups.com<cake-php%2bunsubscr...@googlegroups.com>For
>  more options, visit this group at
> http://groups.google.com/group/cake-php?hl=en
>
> To unsubscribe, reply using "remove me" as the subject.
>

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 cake-php@googlegroups.com
To unsubscribe from this group, send email to
cake-php+unsubscr...@googlegroups.com For more options, visit this group at 
http://groups.google.com/group/cake-php?hl=en

Reply via email to