I used this element and got this error:
Missing Helper
Error: JavascriptHelper could not be found.
Error: Create the class JavascriptHelper below in file: app/View/Helper/JavascriptHelper.php
<?php
class JavascriptHelper extends AppHelper {
}
Well, really, this file does not exist, and I tried to use "Js" in my auxiliary array.
class myClassController expend AppController {
var $helpers = array('Html', 'Js'); // and not 'Javascript');
In the code, the method $this->Javascript->codeBlockis called to add the javascript method (in the middle of the contents instead of the header), but $ this-> Js-> codeBlockcodeBlock does not exist.
$output .= $this->Js->codeBlock("datepick('" . $htmlAttributes['id'] . "','01/01/" . $options['minYear'] . "','31/12/" . $options['maxYear'] . "');");
Could you explain to me what happened to the old Javascript helper or how to make the code work?
Is there any other helper that can work with CakePHP-2.0?
Cordially,
source
share