modified to submit from JS.
modified to submit from JS.