Hi Below is the code in which through ajax call in jquery i AM calling function 1:"setEmailAFriendCount" in which we are sending variable having json datatype but I want to call the same function from ajax call but need to send extra string parameter to it.
I am confused, how to send one. P
function getEmailAFriendCountDynamic(ArticleURL, Id) {
alert('Hi');
var location = ArticleURL;
if (location.indexOf('?') >= 0) {
location = location.substring(0, location.indexOf('?'));
}
$.ajax({
url: 'http://contactimporter.mercola.com/EmailArticleCount.aspx?url=' + location,
dataType: "jsonp",
jsonpCallback: "setEmailAFriendCount"
});
}
Function 1:
function setEmailAFriendCount(json) {
$('#MyTextbox').text(json.count);
}
Function 2:
function setEmailAFriendCount(json,emailtofrdclientid) {
$('#' + emailtofrdclientid + '').text(" : " + json.count);
}