0
jquery ajax를 사용하여 입력 값을 PHP로 보내주는이 HTML 양식이 있습니다. 프로세스는 잘 진행되었지만, 필자가 마우스 오른쪽 버튼을 클릭하고 요소> 네트워크> 헤더를 검사 할 때만 볼 수 있습니다. 불행히도 실제 페이지는 그대로 유지됩니다.HTML jQuery Ajax에서 PHP로 값을 전송하는 양식
어쨌든 내가 잘못 했습니까? 도와주세요. 정말 고마워. 정말 고마워.
- 내가 분명히 프로세스가 잘 갔다와 올바른 결과를 보여 주었다 때문에 내가, JQuery와 아약스에 엉망 것 같아요 원인 난, 전체 코드를 포함 didnt는
HTML 양식
<div class="product-filter-type">
<input type="radio" class="checkFilter" id="filterAllTV" name="typeTV" value="AllTV" checked><label class="filterType" for="filterAllTV">All TV</label><br/>
<input type="radio" class="checkFilter" id="filterFHDTV" name="typeTV" value="FHD"><label class="filterType" for="filterFHDTV">FHD/HD</label><br/>
<input type="radio" class="checkFilter" id="filter4K" name="typeTV" value="FOURK"><label class="filterType" for="filter4K">4K</label>
</div>
JAVASCRIPT/JQUERY/AJAX
,210PHP (FUELPHP는)
public function action_product() {
$this->set_meta_info($this->_meta_slug);
$input_data = \Input::param();
if(count($input_data) > 0){
$this->_filter($input_data);
}else{
$this->_data_template['product'] = \Product\Productutil::get_product_data();
$this->_data_template['AllTV'] = 'checked';
}
return \Response::forge(\View::forge('pages::frontend/product_list.twig', $this->_data_template, FALSE));
}
private function _filter($input_data) {
$this->set_meta_info($this->_meta_slug);
if (count($input_data) > 0) {
$type = isset($input_data['type']) ? $input_data['type'] : null;
if ($type){
$this->_data_template['product'] = \Pages\Filterutil::get_type_product($type);
$this->_data_template[$type] = 'checked';
}elseif { ... }
return $this->_data_template;
}
}
예상되는 결과는 무엇입니까? 모든 코드는 AJAX 요청을 보내고 콜백에서 아무 것도하지 않으므로 UI의 아무 것도 변경되지 않습니다. –
질문하기 –
dev 도구에서 xhr 요청을보아야합니다. 주 페이지의 헤더가 변경되지 않습니다. – madalinivascu