I am trying to change a label value (lblRecipient) inside my Jquery dialog through a hiddenfield but somehow the label value is always empty, here I did a test by assigning a value ‘1234’ and I can get the values in the alert box but the label value itself is empty. Please kindly advice.
function sendPMDialog() {
$("#PMDialog").dialog('open');
$("#PMDialog").scrollTop($("#PMDialog").scrollTop() - 1000);
var Y = document.getElementById('<%=lblRecipient.ClientID %>').innerText = '1234';
alert(Y);
}
You’re doing two assignments in one statement. Try breaking it down into one assignment per statement:
or (using jQuery syntax):