Get the field value of another field by using the API
for this I have wrote a function in client in client side
function statename(){
$.ajax({
url: myurl to get the statename,
type: "GET",
dataType: 'json',
success: function (data, textStatus, jqXHR) {
$("#state").val(data);
},
error: function (jqXHR, textStatus, errorThrown) {
alert('error')
}
});
}
here the code is working and I got the statename and it is automatically set to the another field.
in the client script the url content with the username and password.
So any body can see the url use in the client side.How can I hide this url with username and password.