0

I have the following html structure.

<form id="inner" name="dummy">
    ...
        <input type="text" name="set[0][0][xy]" />
        <input type="text" name="set[0][1]" />
        <input type="text" name="set[1][axy]" />
        <input type="text" name="set[2][asxy]" />
        <input type="text" name="set[2][1][xdsay]" />
        <input type="text" name="set[2][2][xasdy]" />
    ...
</form>

I need to send the fields only with name="set[....]" by ajax. And the depth of the multidimensional array is changing.

Any idea?

2
  • And yes, I am not able to change the structure. Commented Jun 10, 2013 at 3:26
  • So you want to send all the fields? your description is very vague. Also I see an ajax tag but no ajax code. Commented Jun 10, 2013 at 4:25

1 Answer 1

3

first of all your markup is invalid you can't have a form in another form, the browser's parser will sort that out.
Your problem is that you selector is wrong, there if no form with name inner, the form has an id inner, so your selector will be form[id="inner"] or form#inner or #inner

Sign up to request clarification or add additional context in comments.

3 Comments

Ok. Do you have any solution? I need the fields, with name "set" to be send.
@user1279563 I gave you the selector to use to select the form, just serialize it and you have the fields.
Ok, my bad I realize that I wrote name above.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.