Jump to content

[Prototype] Use postbody to send an form array


mbrouwer88

Recommended Posts

Hello all,

 

I am quite new to Ajax, but got as far as sending a form through post with Prototype's postbody function. That works fine.

Now I have a form that contains a dynamic amount of input fields (checkboxes), like

 

<input type="checkbox" name="modules[2]" value="y">
<input type="checkbox" name="modules[3]" value="y">
<input type="checkbox" name="modules[1]" value="y">

 

But hey,

postBody: 'modules='+$F('modules')+'&action=addcustomerdo', 

 

does not work. I found some howto to use form.serialize, but this seems to require the use of the submit function. I dont want to submit, since it refreshes the whole page. I just want to it to reload some div with the results.

 

Please help.

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.