Fixed sumbit button refresh problem. Moved javascript to external genGrid.js file