Bookmarks

Yahoo Gmail Google Facebook Delicious Twitter Reddit Stumpleupon Myspace Digg

Search queries

078274121, info0a ip, should prodicers of software_based services be held liable or not liable for economic injuries, should producers of soft ware based services such as ATMs be held liable for economic injuries suffered when their systems fail?, nisc wwwxxx, wwwxxx0cm, should producers of software-based services, such as atms, be held liable for economic injuries suffered when their systems fail?, wwwxxx0cm, www.webdp.net, Event 9 IIS log failed to write entry

Links

XODOX
Impressum

#1: auto-generating form value permutations..

Posted on 2008-01-17 19:19:44 by jonKushner

id like to create a script that runs through a form, and autogenerates
every single permutation for every single value, as well as option.
The task is because I am currently working on a webservice project
where I am feeding in nightly a set of values from an external data
source, and populating my form with those values. In the end, I end up
resending a new query to this datasource with a custom url, including
as parameters the values chosen. Sooooo, the end goal would be to have
one massive array which I can see all of the various URL's that get
created for the user.

I hate bleek descriptions, so heres a little visual:

element1 => selectbox('opt1','opt2','opt3')
element2 => textbox('val1')
element3 => multipleselect('multopt1' through 'multoptN')

so, a simple forloop on the 1st option within the first selectbox as
my primary choice could produce several values.. here would be 2
permutations:

values[] = arr('opt1','val1','multopt10');
values[] =
arr('opt1','val1',array('multopt10','multiopt33','multiopt34 '));

and then in the end( not what I am concerned about, but just to
complete the example):

URL://?selectboxid=opt1&textboxid=val1&multipleselectid=mult iiopt10
-or-
URL://?selectboxid=opt1&textboxid=val1&multipleselectid[]=mu ltiiopt10
&multipleselectid[]=multiiopt33&multipleselectid[]=multiiopt 34

conceptually, i just can't think how to approach this.

ideas?

Report this message