I am submitting a form element named "CCExp" it is made up of two select boxes #Month and #Year. I need to combine #Month and #Year so it submits as MM/YYYY.
$("#CCExp").val($("#Month") + '/' + $("#Year"));
Is this close?
I am submitting a form element named "CCExp" it is made up of two select boxes #Month and #Year. I need to combine #Month and #Year so it submits as MM/YYYY.
$("#CCExp").val($("#Month") + '/' + $("#Year"));
Is this close?
Very close. I think this should do it:
$('#CCExp').val($('#Month').val() + '/' + $('#Year').val());