How to get a value of an element by name instead of ID
$('[name=whatever]').val()
The jQuery documentation is your friend.
Use the name attribute selector:
$("input[name=nameGoesHere]").val();
Use the name attribute selector:
$("input[name='nameGoesHere']").val();
It is a mandatory requirement to include quotes around the value, see: http://api.jquery.com/attribute-equals-selector/