Hi Geoff,

Form.serialize() (with the "true" parameter) returns a hash; you just
add things to the hash before passing it on to the Ajax.Updater.

Give the form an ID (rather than a name) so you can retrieve it with $
(), and give the form fields names (rather than or in addition to IDs;
form fields work with names, since the name can be repeated on the
page).  Then this code in place of your current params stuff should do
the trick:

* * * *
var params;
params = $('form1').serialize(true);
params.groupnumber = group_number;
params.emailaddress = email_address;
params.cue1clicked = cue1_clicked;
* * * *

Hope this helps,
--
T.J. Crowder
tj / crowder software / com

On Mar 28, 5:49 pm, geoffcox <[EMAIL PROTECTED]> wrote:
> Hello
>
> I have given myself a headache! I would like to use Form.serialize to
> get data from some forms and combine this with data obtained from
> elsewhere and then use Ajax.Updater but do not know how to do this ...
>
> I have code below - how do I use Form.serialize to get the checkbox
> result into Ajax.Updater? In other words what goes into
> the ??:?? ........
>
> Cheers
>
> Geoff
>
> function send(){
> var params =
> ({groupnumber:group_number,emailaddress:email_address,cue1clicked:cue1_clicked,??:??});
>     new Ajax.Updater(
>         'updateDiv',
>         'send.php',
>         {
>             asynchronous:true,
>             method:'get',
>             parameters: params
>         }
>     );
>
> }
>
> <form name="form1">
> Nowhere in particular <input type="checkbox" id="cb1">
> </form>
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups "Ruby 
on Rails: Spinoffs" group.
To post to this group, send email to rubyonrails-spinoffs@googlegroups.com
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/rubyonrails-spinoffs?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to