Hi SumumarsB and welcome,
You can set up your form to submit to a SharePoint list using qRules - you don't have to write code. We stopped providing code help for this since we added it to qRules, an inexpensive plugin that you can use for all of your forms. Check out the free trial today. Should take you 20 minutes to get it all working.
Also, you're javascript isn't going to work down the road since it was deprecated in browser forms in 2007/2010.
Sorry I can't be of more help, but qRules is a free trial download and it's easy to use.
Cheers!