The form parameters must be name(d)

i..e

<input type="text" name="deco">

id is not enough

Deco
On Apr 21, 2006, at 9:11 PM, Matt Grommes wrote:

I'm sure I'm missing something dumb but I cannot get Form.serialize to work. I have an alert in the function as a debug to show me what's supposed to be the serialized line of values but it always shows nothing. Can somebody show me what I'm doing wrong? Thanks in advance.


function submitprofile() {

    var url = "/profile/submitprofile.html?";

    var formvals = Form.serialize('profileformid');
alert("f - "+formvals);
new Ajax.Request(url, {method: 'post', parameters: formvals, onComplete: confirmform});

}

<form name="profileformname" id="profileformid" onsubmit="submitprofile();return false;"> First Name: <input type="text" value="<% $user_href->{fname} % >" id="fnamefield" size="50"><br> Last Name: <input type="text" value="<% $user_href->{lname} %>" id="lnamefield" size="50"><br> Email Address: <input type="text" value="<% $user_href->{email} %>" id="emailfield" size="50"><br>
    <br>
    Optional Info<br>
    <br>
Zipcode: <input type="text" value="<% $user_href->{zipcode} %>" id="zipcodefield" size="5"><br> Age: <input type="text" value="<% $user_href->{age} %>" id="agefield" size="2"><br> Birthday: <input type="text" value="<% $user_href->{birthday} % >" id="birthdayfield" size="10"><br> <!-- add ajax parse confirm here -->
    <br>
    <input type="submit" value="Submit changes"><br>
</form>



_______________________________________________
Rails-spinoffs mailing list
Rails-spinoffs@lists.rubyonrails.org
http://lists.rubyonrails.org/mailman/listinfo/rails-spinoffs

_______________________________________________
Rails-spinoffs mailing list
Rails-spinoffs@lists.rubyonrails.org
http://lists.rubyonrails.org/mailman/listinfo/rails-spinoffs

Reply via email to