This is my form. It creates a comment in the database but won't pass the
'body' value. I think the problem is passing the variable to javascript.
Can anyone help?
<script>
function serialize_fields(){
var fields = new Array();
fields.push(Form.Element.serialize('document.form.body'));
return fields.join('&');
}
</script>
This is my form. It creates a comment in the database but won't pass the
'body' value. I think the problem is passing the variable to javascript.
Can anyone help?
Your serialize_form method looks borked. You could use the
remote_form_for method alternatively, prototype already provides a
serialise method for forms - $('id_of_the_form').serialize() will
serialise all then inputs in the form
This is my form. It creates a comment in the database but won't pass the
'body' value. I think the problem is passing the variable to javascript.
Can anyone help?
<script>
function serialize_fields(){
var fields = new Array();
fields.push(Form.Element.serialize('document.form.body'));
return fields.join('&');
}
</script>
I tried this too
:with=>"'body' + $F('body')"
That doesn't work either. How can I pass this parameter?