开发者

Kohana v .3.0.8 Framework - Dynamically filling the dropdown list based on first dropdown

开发者 https://www.devze.com 2023-02-16 03:50 出处:网络
I am using Kohana v 3.0.8 Framework, not very much familiar with Kohana and only a novice with PHP and Javascript.

I am using Kohana v 3.0.8 Framework, not very much familiar with Kohana and only a novice with PHP and Javascript.

开发者_开发问答I am working on a project where I have a Form::select (dropdown list) filled with a list of categories and another select (dropdown list) which needs to be filled dynamically based on which of my categories in the first select (Dropdown list) is selected. So I know I need an "onchange" function, but I am not sure how to include it.

Please can anyone provide me an example on it. How to do it using ajax and kohana?

Your help will be appreciated.

Thank you.


There is an attributes parameter

<?php echo Form::select('name', array(),'', array('onchange', 'myFunction()')); ?>

0

精彩评论

暂无评论...
验证码 换一张
取 消