Alexey Pechnikov wrote:
2011/5/10 Dave Bauer<d...@thedesignexperience.org>:
I am not sure I understand hat you are trying to accomplish. What is an HTTP
Form Array? I am not aware of such a thing. It looks like you are passing
some application specific formatted data and need to process it.

This is very popular situation! The HTML example with checkboxes array:

It may be a common situation, but that doesn't mean it is well-defined. In your example below, what would "querygetarray" do when the counts of the keys are not the same? Would it generate blank entries for those, drop the keys without enough values, or refuse to process it (possibly by raising an error)?

A fuller specification of what the function does would be helpful. Does this function exist for other frameworks? Maybe seeing the docs of those would help explain things.

Otherwise, this seems like a function specific to using jquery; perhaps it would go better in a jquery support library.

-J


<form method=post action=''>";
<input type=checkbox name=box value='John'>
<input type=checkbox name=box value='Mike'>
<input type=checkbox name=box value='Rone'>

Param "box" is array.

As example, a simple HTTP GET request:
/?a=first&a=second&b=1&b=2

In this request we can see 2 two-elements arrays:
a=first, a=second
b=1, b=2

or 2 rows:
a=first, b=1
a=second, b=2

Problems:

1. When names and number of the array elements are not known we can't
use ns_querygetall

2. When some items can be not defined is needed the additional check
of arrays elements count. As example
/?a=first&a=second&b=1&a=third&b=3
But
[ns_querygetall a] {first second third}
[ns_querygetall b] {1 3}

Of course, these are _not_ the 3 rows becouse value [lindex
[ns_querygetall b] 2] = "" is invalid!



--
AOLserver - http://www.aolserver.com/

To Remove yourself from this list, simply send an email to 
<lists...@listserv.aol.com> with the
body of "SIGNOFF AOLSERVER" in the email message. You can leave the Subject: 
field of your email blank.

Reply via email to