Zend Framework 프로젝트에서 JavaScript 및 Dojo에 문제가 있습니다. Zend의 Form에 의해 만들어진 4 개의 슬라이더 (HorizontalSlider)가 있습니다. 모든 슬라이더는 다른 값을 가지며이 값은 슬라이더 근처에 표시하려고합니다. Javascript가 Zend Framework의 Dojo를 닫습니다.
function getText(){
var cena = document.getElementById("slider-400")
var waga = document.getElementById("slider-100")
var bateria = document.getElementById("slider-700")
var cale = document.getElementById("slider-1")
var div = document.getElementById("znajdz-contents")
div.innerHTML = "Cena : "+(Round(cena.value,2))+" <br/>" + "Waga : "+(Round(waga.value,2))+" <br/>" + "Bateria : "+(Round(bateria.value,2))+" <br/>" + "Wyswietlacz : "+(Round(cale.value,2))+" <br/>"
}
그리고 형태
젠드에서 :$this->addElement(
'HorizontalSlider', 'cena', array(
'label' => 'Maksymalna cena',
'value' => 2000,
'onchange' =>"getText()"
'minimum' => 400,
'maximum' => 2000,
'discreteValues' => $discrete,
'intermediateChanges' => false,
'showButtons' => false,
'topDecorationDijit' => 'HorizontalRuleLabels',
'topDecorationContainer' => 'topContainer',
'bottomDecorationDijit' => 'HorizontalRule',
'bottomDecorationContainer' => 'bottomContainer',
'bottomDecorationLabels' => array(
'400zł',
'1200zł',
'2000zł'
),
)
);
에 변경 :
$cena->setAttrib('onChange','getText()');
망가 너무 작동 그래서 내가 JS의 코드를 얻었다. 이 줄을 삭제하면 모든 것이 작동합니다. 그리고이 작품을하지만 내가 제출 누르면 내가 Cena - 2000에 대한 정적 가치있어. JS 좋은 가치를 보여줍니다. 뭐가 문제 야? 제발 도와주세요 아니면 여기에서 죽어요 :/
문제를 해결 한 경우 답변을 작성하고 수락하십시오. ** 솔루션은 질문에 포함되지 않습니다. ** –