tags:

views:

60

answers:

1

Hi, i am working in php. I have written code for displaying combo box like this :

<select name="country" id="idCountry" class="clsCountry" >
 <?php foreach($objCountries as $objCountry):?>
  <option value="<?php echo $objCountry->getId()?>" ><?php echo $objCountry->getName()?>   </option>
 <?php endforeach;?> 
</select></td>

For change event:

$("#idCountry").change(function(){ .... });

but change event is not getting fired. Anybody have any idea about it? Thanks in advance.

A: 

First, is the code placed inside the ready function of the document?

$(document).ready(function()
{
     //code here
});

Or try this:

$("#idCountry").ready(function()
{
  $("#idCountry").change(function(){
    //code here
  });
});
mives
i tried by both the ways but still not working ...
siya