I am trying to get the values from input boxes and then print them out as a sentence into a list. In theory I feel this should work but don't understand why it is not. please help!
$('add_gowns').click(function() {
var size = document.getElementById("blksize").value;
var colour = document.getElementById("colouroption").value;
var quantity = document.getElementById("gownquantity").value;
$("#content ul li:last").append("<li> Size: "+size+", Colour: "+colour+", Quantity: "+quantity+"</li>");
});
Here is the related html
<td><input type="number" id="blksize"></td>
<td><select id="colouroption"></select></td>
<td><input type="number" id="gownquantity"></td>
<td><input type="submit" id="add_gowns" value="Add"/></td>
</tr>
</table>
<div id="content">
<ul></ul>
</div>
>on the closing table tag a typo?$('#add_gowns').click(function(){ /**/ });