I have this checkboxes

HTML Code:

<input type="checkbox" class="calc" name="access[a]" value="1" />
<input type="checkbox" class="calc" name="access[b]" value="2" />
<input type="checkbox" class="calc" name="access[c]" value="3" />
<input type="checkbox" class="calc" name="access[d]" value="4" />

I need the following thing, i will explain it in an example:
Example: User selects third and fourth fields, 7(3+4) and cd ([access[c]+access[d]) will be send.
I want 2 things to be send, calculation of value and access[values].

Recommended Answers

All 2 Replies

So what it is you are asking for exactly? You want to send the values via AJAX? Ok plain old JavaScript AJAX or are you using a library such as jQuery?

What have you tried, what isnt working for you?

Member Avatar

You don't explain whether this does anything on the server. If it doesn't this could all be done in just js, no ajax required.

If it really is an Ajax solution that you need, why not just send the serialized data and let the server side deal with it?

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, learning, and sharing knowledge.