Javascript parameter problem with onsubmit


I have this problem:

<%= submit_tag ‘Next’, {:onsubmit => ‘return
validate_options(param1,param2,param3);’} %>

function validate_options(params) {
alert (params);
return false;

This does not seem to print out value param3. I only get that popup
saying [object HtmlFormElement]

Its done like this since that form creating those param1 2 3 etc is
dynamic so I dont’t know if there is
param1 or param2 or even all of them. Now on validate_options if need
to check that if param1 is on the
form it should check if that field is filled and if not then give out
that pop up message.

any ideas ?