HTML:
<button type="button" value="" onclick="getInfo(007267, 10140000000)" class="btn btn-xs btn-primary">INFO</button>
JavaScript:
function getInfo(growerid, plantid) {
$.ajax({
type: "POST",
url: "plantsearch.php",
data: "op=" + "info" + "&gid=" + growerid + "&pid=" + plantid + "&ml=" + MyLimit + "&mo=" + MyOffset,
datatype: "text",
success: function (data, status, xhr) {
//$("#tbody_info").html(data);
alert(data);
},
error: function (xhr, status, error) {
alert(status);
}
});
}
The problem is the growerid is correct in the HTML, i.e. 007267, however, when the function is called the value of growerid is not 007267 but 3767. Why is this changing?
Thanks, TD