Re: CAKEPHP Country Region Combobox via AJAX

2009-11-24 Thread NRV
I want to filling up Casts combopbox  from Religion combobox change
event.
Below is code for my View file.

link('prototype'); ?>
 
  
  

input('religion_id');
echo $form->input('cast_id');
?>

 'getCast', 
'update' => 'UserCastId');

echo 
$ajax->observeField('UserReligionId', $options);

 echo $form->end();
?>

Below is my controller action

function getCast()
{


$this->set('options',
$this->User->Cast->find('list',
array('conditions' => array
('Cast.religion_id'=>$this->data['User']['religion_id']),'group' =>
array('Cast.name';
$this->render('/users/update_cast_select');
}

Belos is the update_cast_select result ctp file

$v) : ?>



I am using 3 model right now as below.


CAST MODEL

 'Religion',
'foreignKey' => 
'religion_id',
'conditions' => 
'',
'fields' => '',
'order' => '');

var $hasMany = array(
'User' => array(
'className' => 'User',
'foreignKey' => 'cast_id',
'dependent' => false,
'conditions' => '',
'fields' => '',
'order' => '',
'limit' => '',
'offset' => '',
'exclusive' => '',
'finderQuery' => '',
'counterQuery' => ''
)
);

}
?>


REligion Model

 array(
'className' => 'Cast',
'foreignKey' => 
'religion_id',
'dependent' => false,
'conditions' => '',
'fields' => '',
'order' => '',
'limit' => '',
'offset' => '',
'exclusive' => '',
'finderQuery' => '',
'counterQuery' => ''
),
'User' => array(
'className' => 'User',
'foreignKey' => 'cast_id',
'dependent' => false,
'conditions' => '',
'fields' => '',
'order' => '',
'limit' => '',
'offset' => '',
'exclusive' => '',
'finderQuery' => '',
'counterQuery' => ''
)   );
}
?>
and USER Model

 array(
'className' => 'Religion',
'foreignKey' => 'religion_id',
'conditions' => '',
'fields' => '',
'order' => ''
),
'Cast' => array(
'className' => 'Cast',
'foreignKey' => 'cast_id',
'conditions' => '',
'fields' => '',
'order' => ''
));


-

The problme is IE :  when I change the religion combobox nothing is
heappening.

and in Mozilla : When I change the religin combobx I am finding out
query in Cast combobox.



Let me know if you required more details. Thanks a lot for your help.





On Nov 22, 11:02 am, Pedro Nascimento  wrote:
> It seems it works, would you mind sharing the code?
>
>
>
> On Thu, Nov 19, 2009 at 09:14, NRV  wrote:
> > Hi ALL,
>
> > I have implemented
>
> >http://www.croyantdebridiers.com/CakePHP_AJAX_selectbox_demo/ajaxcomb...
> > locally.
>
> > Its working fine at this moment live but on my local machine when I
> > change the combobox nothing happens. Can anybody help me out with the
> > same example.
>
> > Thank you
>
> > --
>
> > You received this message because you are subscribed to the Google Groups
> > "CakePHP" group.
> > To post to this group, send email to cake-...@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=.- Hide quoted text -
>
> - Show quoted text -

--

Y

Re: CAKEPHP Country Region Combobox via AJAX

2009-11-23 Thread JAY.Z
能看下代码吗?

2009/11/22 Pedro Nascimento 

> It seems it works, would you mind sharing the code?
>
>
> On Thu, Nov 19, 2009 at 09:14, NRV  wrote:
>
>> Hi ALL,
>>
>>
>> I have implemented
>>
>> http://www.croyantdebridiers.com/CakePHP_AJAX_selectbox_demo/ajaxcombobox/users/add
>> locally.
>>
>> Its working fine at this moment live but on my local machine when I
>> change the combobox nothing happens. Can anybody help me out with the
>> same example.
>>
>>
>> Thank you
>>
>> --
>>
>> You received this message because you are subscribed to the Google Groups
>> "CakePHP" group.
>> To post to this group, send email to cake-...@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=.
>>
>>
>>
>  --
> You received this message because you are subscribed to the Google Groups
> "CakePHP" group.
> To post to this group, send email to cake-...@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=.
>

--

You received this message because you are subscribed to the Google Groups 
"CakePHP" group.
To post to this group, send email to cake-...@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=.




Re: CAKEPHP Country Region Combobox via AJAX

2009-11-21 Thread Pedro Nascimento
It seems it works, would you mind sharing the code?

On Thu, Nov 19, 2009 at 09:14, NRV  wrote:

> Hi ALL,
>
>
> I have implemented
>
> http://www.croyantdebridiers.com/CakePHP_AJAX_selectbox_demo/ajaxcombobox/users/add
> locally.
>
> Its working fine at this moment live but on my local machine when I
> change the combobox nothing happens. Can anybody help me out with the
> same example.
>
>
> Thank you
>
> --
>
> You received this message because you are subscribed to the Google Groups
> "CakePHP" group.
> To post to this group, send email to cake-...@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=.
>
>
>

--

You received this message because you are subscribed to the Google Groups 
"CakePHP" group.
To post to this group, send email to cake-...@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=.




CAKEPHP Country Region Combobox via AJAX

2009-11-20 Thread NRV
Hi ALL,


I have implemented
http://www.croyantdebridiers.com/CakePHP_AJAX_selectbox_demo/ajaxcombobox/users/add
locally.

Its working fine at this moment live but on my local machine when I
change the combobox nothing happens. Can anybody help me out with the
same example.


Thank you

--

You received this message because you are subscribed to the Google Groups 
"CakePHP" group.
To post to this group, send email to cake-...@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=.