On Dec 31, 1:52 pm, Maken <[EMAIL PROTECTED]> wrote:
> i m a novice in cakephp
> i make a model with the name of lead
>
> class Lead extends AppModel
> {
>     var $name = 'Lead';
>     var $useTable = 'leads';            /// changing to "abc" table works fine
>
> }
>
> and maken the controller like thaht
>
> class LeadsController extends AppController
> {
>     var $name = 'Leads';
>
>         var $uses = array("Lead");
>         var $helpers = array('html','javascript');
>
>         function index() {
>
>         }
>
> }
>
> add made a view file index.thtml to output some dummy info
>
> when i run the file the flowing erreor accor
>
> Notice: Undefined variable: javascript in pathtoinstalliaction  \app
> \views\layouts\default.thtml on line 9

If you use the javascript helper in your layout, you need to ensure
it's always available. by putting it in your app controller helpers
array ( or wrapping it's use in if (isset($javascript)) { ... } )

Then you'll see a cake-error message. Probably table doesn't exist.

hth,

AD
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups "Cake 
PHP" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/cake-php?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to