I have written a form validation using JS which ends with return(true);
function check() { ....validation code return(true); }
All I want i
You're not calling the function in your affirmative clause, only declaring it. To call an anonymous function do this:
(function (){...})()