Posted January 12 '10 at 06:46 AM
Posts: 50
Hi,
I have done some coding for this in my previous project. It might help you, although not able to understand your problem fully.
Home.php
<form name="search" class="cmxform" id="homeForm" action="<?php echo base_url(); ?>search/result" method="POST">
</div>
<div class="searchWhat">
<input type="text" name="searchTxtBox" id="searchTxtBox">
</div>
<div class="searchWhere">
<input type="text" name="cityTxtBox" id="cityTxtBox" value="<?php echo $city_where;?>" onblur="showAddress(this);">
</div>
<input type="hidden" id="citylatlng" name="citylatlng">
</div>
<script type="text/javascript">
function showAddress(address) {
$("#citylatlng").val('');
var geocoder = null;
var geocoder = new GClientGeocoder();
geocoder.getLatLng(
address,
function(point) {
$("#citylatlng").val(point);
} );
}
</script>
<div class="searchBtn">
<input type="image" src="<?php echo base_url();?>images/c2c-btn.jpg"/>
</div>
</form>
Hope this coding will help you