Hi
I have this problem:
<script>
var param1 = ''field3'';
</script>
<script>
var param2 = ''field3'';
</script>
<script>
var param3 = ''field3'';
</script>
<%= 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 ?
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups
"Ruby on Rails: Talk" group.
To post to this group, send email to
rubyonrails-talk-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org
To unsubscribe from this group, send email to
rubyonrails-talk-unsubscribe-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org
For more options, visit this group at
http://groups.google.com/group/rubyonrails-talk?hl=en
-~----------~----~----~----~------~----~------~--~---