In the following code, batch ends up being 201803.
The first alert shows: 201803.
The second alert shows "ddlYearBatch = ". Why doesn't the value for batch show? I also tried it without the toString and got the same result.
Thanks,
Tom
The first alert shows: 201803.
The second alert shows "ddlYearBatch = ". Why doesn't the value for batch show? I also tried it without the toString and got the same result.
Code:
var batch;
batch = $("#<%=ddlYearBatch.ClientID%>").find(":selected").val() + pad($("#<%=ddlMonthBatch.ClientID%>").find(":selected").val(), 2);
alert(batch.toString());
alert("ddlYearBatch = " + batch.toString());
Thanks,
Tom