0

Hi there I am busy setting up a Form validation with javascript. I was wondering if someone knew how to use window.onload function to assign a validation callback function. The javascript needs to be in it's own file.

1
  • window.onload = function(); Commented Mar 29, 2013 at 2:58

1 Answer 1

1

simply assign your validation callback in the onload function body like this

yourform.onsubmit=function(){
    return your_validation_func();
}
Sign up to request clarification or add additional context in comments.

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.