form on submit prevent default getfile code example Example: javascript prevent form submit <form name="foo" onsubmit="return false">