Adding a JavaScript to prevent form submission.