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