Actually the question stands: "how to trigger observeField on upkey
even"? I found an external JS library www.extjs.com which handles this
event nut I'm not sure that's the right way for handle this ........

On Nov 18, 11:14 pm, maschoen <[EMAIL PROTECTED]> wrote:
> My recent experience is that you want to trigger on the upkey event.
> Ignore the event structure itself.   Go to the field and read its
> value.
> If you look on the downkey, the value hasn't been updated yet.
>
> On Nov 17, 6:03 am, senser <[EMAIL PROTECTED]> wrote:
>
> > I can't understand why every time I start a new discussion here
> > (writing the first post) the post is submiited twice. That happens
> > every time and I press "Submit" button just once ..................
>
> > On Nov 17, 1:00 pm, senser <[EMAIL PROTECTED]> wrote:
>
> > > Hi,
> > > I have a form where users must select from over 11000 records in
> > > list_box. I'm using ajax to observe text field and update select to
> > > reduce high load when loading page (If I populate list box with 11K
> > > records page renders very slow).
> > > So the problem is that $ajax->observeField() triggers not on typing in
> > > text field, but when the field lost focus. In other words - it works
> > > on javascript "onBlur" event, not on "onChange".
> > > Is there a way to populate my list_box when user is typing in text_box
> > > and is not necessary to press TAB, or to click somewhere with mouse .
> > > Here is snippet from my view (I don't think there is a problem in
> > > controller or model code, because if the text_field lost focus all is
> > > fine and working)
>
> > > print $form->input('Employer.string', array('type'=>'text',
> > > 'maxlength'=>'5', 'size'=>'10', 'id'=>'employer_string',
> > > 'label'=>'Employer'));
>
> > > print '<span class="ajax_update" id="ajax_indicator" style="display:
> > > none;"><img src="/cake_apps/img/ajax_update.gif" alt="Working..." /></
> > > span>';
>
> > > print $form->input('CustomerTaxDetail.employer_id',
> > > array('type'=>'select', 'label'=>'', 'options'=>$employersArray,
> > > 'showEmpty'=>false, 'size'=>4,
> > > 'id'=>'employers',                                   
> > > 'error'=>array('required'=>'Employer is
> > > obligatory', 'maxlength'=>'Employer code max length is 8 symbols',
> > > 'number'=>'Employer code must be a number')));
>
> > > print $ajax->observeField('employer_string', array('url'=>'/employers/
> > > autocomplete', 'update'=>'employers', 'indicator'=>'ajax_indicator',
> > > 'onChange'=>true));
>
> > > P.S. Even when I write something like this:
> > > print $form->input('Employer.string', array('type'=>'text',
> > > 'maxlength'=>'5', 'size'=>'10', 'id'=>'employer_string',
> > > 'label'=>'Employer', 'onChange'=>'window.alert(\'CHANGE\')'));
> > > nothing happens when typing in text box
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups "Cake 
PHP" 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
-~----------~----~----~----~------~----~------~--~---

Reply via email to