$ajax->observeField problem

2009-03-20 Thread Manisha P

Hello All,

I am using ajax helper to check, at the time of registration the
entered username is already exist in database or not.

For that I have used

text('User.login_name', array('class' => 'users', 'id' =>
'login_name')); ?>
$options = array('url' => 'update_select', 'update'
=>'valid_username');
echo $ajax->observeField('login_name',$options);
?>

This is working properly and showing me error message "Username
already exist" in valid_username div

but I need, at the same time the login_name text box should be clear
and got focus in that.

Does anyone have some idea?

-Manisha.
--~--~-~--~~~---~--~~
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
-~--~~~~--~~--~--~---



Re: $ajax->observeField() problem

2009-03-17 Thread gayatri bhumarapu
try this code for drowp down functionality

echo
$form->create('PopularFirm',array('url'=>array('controller'=>'dashboards','action'=>'popular_firms'),'div'=>false));

echo $form->input('name',
array('label'=>false,'div'=>false,'style'=>'margin-left:0;width:150px','type'=>'select','options'=>$firmlist
,'id'=>'popularlist','empty'=>'All'));

echo $ajax->observeField('popularlist',
array('with'=>'Form.Element.serialize(\'popularlist\')','url'=>'popular_firms','update'=>'popular_info','complete'=>"Effect.Appear('popularlist');",'onChange'=>true));

  echo $form->end();


On Mon, Mar 16, 2009 at 4:54 PM, Manisha P  wrote:

>
> Hello All,
>
> I am using $ajax->observeField()
>
> It is showing me error 'Form is not defined' in javascript console.
>
> Does anyone has some solution for this?
>
> Thanks in advance
>
> Manisha.
> >
>


-- 
Regards,
Gayatri,
IT Associate,
IEG,
Hyderabad.

--~--~-~--~~~---~--~~
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
-~--~~~~--~~--~--~---



$ajax->observeField() problem

2009-03-16 Thread Manisha P

Hello All,

I am using $ajax->observeField()

It is showing me error 'Form is not defined' in javascript console.

Does anyone has some solution for this?

Thanks in advance

Manisha.
--~--~-~--~~~---~--~~
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
-~--~~~~--~~--~--~---