0
안녕하세요! cakephp에서 아약스 문제가 있습니다. 필자는 아티스트 컨트롤러의 "추가"작업과 "미리보기"클래스가있는 빈 div를 가리키는 클래스 "이벤트"와의 링크가 있다고 봅니다. 컨트롤러는 작업을 수행 할 때 $ this-> render ('preview', 'ajax')로 설정 한 기본보기 대신 "Add"기본보기를 렌더링합니다. 누군가가 나를 도와 줄 수 있습니까?cakephp ajax 렌더링
$this->Js->get('.event');
$this->Js->event(
'click',
$this->Js->request(
array('controller'=>'artists','action'=>'add'),
array('async'=>true,'update'=>'.preview')
)
);
내 컨트롤러 :
if($this->RequestHandler->isAjax()) {
$this->autoRender = false;
$this->render('preview');
}
귀하의 질문에 대한 정확한 이해가 확실하지 않습니다. 양식 데이터가로드 된 $ this-> request-> data 또는 $ this-> data (케이크 버전에 따라 다름)가 있습니까? – Mo3z