Click here to Skip to main content
15,886,067 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
This mistake is coming when first time i am going to open this edit section.i.e if in edit section i am clicking upon state dropdown all the states are coming.It should come like states according to a country.but after clicking upon another state.it is coming fine.so what can i do?

in edit.ctp
<script src="js/jquery.min.1.8.3.js" type="text/javascript"></script>
JavaScript
function showFields(id) 
{ 
  var strURL = '<?php echo HTTP_ROOT; ?>';
   var image = "<?php echo HTTP_ROOT . 'img/ajax-loader-small.gif'; ?>" 
        $('#loader').html("<img src='"+image+"' />");
  $.post(strURL+"venues/ajaxstate",{"country":id},function(data){  
            if(data) { 
			$('#result').html(data); 
			$("#loader").hide(); 
            }
			else
			{
                alert("Error...");	
            }
        });
}
Posted

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900