type="button" to the button.
<button name="data" type="button" onclick="getData()">Click</button>
The default value of
type for a button is
submit, which self posts the form in your case and makes it look like a refresh.
~ Answered on 2012-11-07 02:16:04