I'm using ajax in my php site. In there I have two buttons named as submit and cancel. When I click submit button it validates data using ajax. (No need to use form for this). But the following code is not working for cancel button
If I put form,
cancel button is working but errors return from the submit button are gone. Could someone pls help me ?
Code:
function Cancel(){
cancel = document.getElementById('test').value.reset();
}
Code:
(<form name"test.php">)
Comment