Hi all,
I need some help related to AJAX helper. What I am trying to do is
validate a username field to check whether the Username already exists
in the Database. Trying to do this onblur event of the text field.
OnBlur of the text field a AJAX request fires and in response I get a
message saying "Username already exist"/"Username is available". I
need to send the entered username over to the controllers method via
the AJAX request. But I am not able to do so.. Please suggest how to
send the value of the Input field over to the controller action via
Ajax. My code lies below,
$remoteFunction = $ajax->remoteFunction(
array(
'url' => array( 'controller' =>
'users', 'action' => 'view',
1 ),
'update' => 'post',
)
);
echo $form->create();
echo $form->input('username', array('label' => false, 'onblur' =>
$remoteFunction ));
echo $form->end();
Please revert back as soon as possible
Thank you
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