How call a method that return a value from a event

Hi, i am calling a method JS from a event PHP, the method JS verified some fields requerides depending from a rule, and must return a value to event onvalidate.

how can i call this method and get the value?

Re: How call a method that return a value from a event

JS methods are made to be called from the browser thought a button, a link …

onValidate is a php method, called from the web server … you cant call a JS method …

?