tags:

views:

17

answers:

1

is there an SelectIndexChange event in grails listbox or some thing like it. and what is the code of it. and how it is working?

A: 

I use jQuery for any of my clientside interaction/actions.

So say in your html you have a grails select list such as:

<g:select from="${1..20}" name="quantity"/>

with jQuery you can easily hookup an event with the following

<script type="text/javascript">
$(document).ready(function() {
  $('#quantity').change(function() {
      var selectedQuantity = $("#quantity").val();
      alert('you selected '+selectedQuantity);
  }(;
});
</script>
Dave