I have fix it..
I remove
<input type="hidden" name="sCountry" id="sCountry" class="sCountry" value="<?php echo Params::getParam('sCountry'); ?>"/>
<input type="hidden" name="sRegion" id="sRegion" class="sRegion" value="<?php echo Params::getParam('sRegion'); ?>"/>
And it working perfectly..
And one more thing..
When i use
<h6><?php _e('Region', 'veronika'); ?></h6>
<?php ItemForm::region_select(osc_get_regions(osc_user_country()), osc_user()); ?>
<h6><?php _e('City', 'veronika'); ?></h6>
<select id="sCity" name="sCity">
<option value="">Any City</option>
</select>
<input type="hidden" id="sRegion" name="sRegion" value="" />
And javascript
$('#regionId').change(function updateCityList() {
var actualRegionId = $(this).val();
if ( Math.floor(actualRegionId) == actualRegionId && $.isNumeric(actualRegionId)) {
/*Get cities per region*/
$.ajax({
url: "<?php echo osc_base_url(true); ?>?page=ajax&action=cities",
data: { regionId: actualRegionId },
success: function( cities, err){
var $el = $("#sCity"),
citiesOptions = {};
$('#sCity option:gt(0)').remove();
$el.val("");
$el.prev("span").text("Any City");
$.each(cities, function(key, value) {
$el.append($("<option></option>")
.attr("value", value.s_name).text(value.s_name));
});
$("#sRegion").attr("value", $("#regionId option[value='"+actualRegionId+"']").text());
},
dataType: "json"
});
}
});
If user select Region it won't load any city..
Is anything wrong with the code