Search code examples
javascriptformsinputbox

What is onSubmitCheck for?


I'm working on a form which has this code in the submit button :

<input type="submit" onclick="return onSubmitCheck(document.forms['name'])">

When I delete this part onclick="return onSubmitCheck(document.forms['name'])" it works as normal as before so I don't have any idea what is that for. Is it for security of form or something else?

Is it ok to remove it?


Solution

  • From the look of it, it is a JavaScript function which is suppose to run when you click on the submit button. You need to look at your JavaScript files and find the function and see what it does. Whether it is safe to remove or not, depends on what it does.