Use the $javascript->event along with $ajax->remoteFunction.
On Jun 24, 10:59 am, adnangohar <[EMAIL PROTECTED]> wrote:
> Hi,
>
> I am using $ajax->ObserverField('mydd',$options) to call ajax from my
> page. It works fine but works on the onchange event of my <select> tag
> by default. How can i change its behaviour of calling ajax on not on
> its onchange event but on its onblur event.
>
> The code which i am using in my view is:
>
> <div class="required" >
> <select id ="mydd" name ="mydd" >
> <option value="a">1996</option>
> <option value="b">1997</option>
> <option value="t">1998</option>
> </select>
>
> ?php
>
> $options = array(
> 'update' => 'view',
> 'with' => 'Form.serializeElements($("myForm").getElements())',
> 'url' => '/people/search',
> 'frequency' => 1,
> 'loading' => "Element.hide('view');Element.show('loading')",
> 'complete' => "Element.hide('loading');Effect.Appear('view')"
> );
>
> echo $ajax -> observeField('mydd', $options);
> ?>
--~--~---------~--~----~------------~-------~--~----~
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
-~----------~----~----~----~------~----~------~--~---