how to use ajax in the script and call the controller

Permalink 1 user found helpful
hi I'm working i web application,
I want to run function without page reloading and need to call function as AJAX.

i using two dropdown box, my requirement is, the second dropdown box should display a set of values from database is based on the selection from the first dropdown box.

<select name="taProj" id="taProj" onchange= "checkField(this.value)">
                     <option value="" >-------------------------</option>
                     <?php   foreach ($tap as $row){?>               
                     <option value="<?php echo $row['proj_id']; ?>" ><?php echo $row['proj_name'];?></option>
                     <?php } ?>

script code:
<script type="text/javascript">
   function checkField(val){

how to call my controller from onchange event of the select and then load the my another dropdownlist
please give the suggestion ..


View Replies:
JohntheFish replied on at Permalink Reply
shankumars replied on at Permalink Reply
thanks John ... but i want solution without add any addon,,, is it possible?
JohntheFish replied on at Permalink Reply
The addon is not a solution.

It is examples of how ajax works in c5 that you can use to learn how to put together your own solution. Hence 'lessons'.