I have the following javascript function that updates a text within a div when a button is clicked (using an onclick() event) It works, but it immediately changes back to th
You are actually submitting the form. Prevent that by adding return false to the onclick attribute: