just put single apostrophe before and after the parameter value in the calling function example: onclick="addProgressGoal('abc','def');"