hi I am using following code for currency Converter but $.ajax () does not call the web service
<script type="text/javascript">
alert('lkdfls');
$(function () {
alert('lkdfls');
$('#btnConvert').click(function () {
alert('lkdfls');
var amount = $('#txtAmount').val();
alert(amount);
var from = $('#ddlfrom').val();
alert(from);
var to = $('#ddlto').val();
alert(to);
$.ajax({
type: "POST",
url: "WebService.asmx/CurrencyConversion",
data: "{amount:" + amount + ",fromCurrency:'" + from + "',toCurrency:'" + to + "'}",
contentType: "application/json; charset=utf-8",
dataType: "json",
success: function (data) {
alert('kk');
$('#currency_converter_result').html(data.d);
alert('dd');
}
});
});
});
</script>