I need to perform some operation using javascript to set the value of a hiddenfield.
<g:hiddenField name="city" value="" />
So onclick of a button I should set value of 'city' based on js function call. Is it possible?
Yes, it's possible.
$("input[name='city']").val("some value to set here");