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.

Link to comment
Share on other sites

This thread is more than a year old. Please don't revive it unless you have something important to add.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • 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.