hi,all.
here i wanna to update the second selectbox on change of the first
select box by Ajax helpers..the error below:
Notice: Undefined variable: javascript in /var/www/zhouj/
CommercialEstate/app/views/layouts/default.thtml on line 8
Fatal error: Call to a member function link() on a non-object in /var/
www/zhouj/CommercialEstate/app/views/layouts/default.thtml on line 8
my codes below:
/******../layouts/default.thtml**********
...
<?php echo $html->charsetTag('UTF-8') ?>
<?php echo $javascript->link('prototype') ?>
<?php echo $javascript->link('scriptaculous.js?load=effects') ?>
...
/******../profiles/add.thtml**********
...
<div class="optional">
<?php echo $form->labelTag('subgeoid', 'Subgeoid');?>
<div id="division">
<?php echo $html->selectTag('Profile/subgeoid', $division, '01' ,
array('id'=>'subgeoid','onchange'=>"new
Ajax.Updater('subdivision','admin/profiles/sltdivision/',
{asynchronous:true, evalScripts:true, parameters:
Form.Element.serialize('subgeoid'), requestHeaders:['X-Update',
'subdivision']})")); ?>
</div>
</div>
<div class="optional">
<?php echo $form->labelTag('Profile/thirdgeoid', 'Thirdgeoid');?>
<div id="subdivision">
<?php echo $html->selectTag('Profile/thirdgeoid',
$subdivision);?>
</div>
</div>
...
/******../controllers/profiles_controller.php**********
...
var $helpers = array('Html', 'Form' , 'Javascript', 'Ajax');
...
someone could help me?
thanks.
jonas.
--~--~---------~--~----~------------~-------~--~----~
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
-~----------~----~----~----~------~----~------~--~---