I have a large form with quite a bunch of pull downs to select. Then a
submit button.
The thing is that there can be up to 1300 vars, and maybe more in the
future, but in every post only 10 or 15 are valid for the program. How
can I eliminate them from the list of variables that are finally
Will be better then if you just send the 15 valid params
params = {field1: $F('fielf1'),
field2: $F('fielf2')
.
field15: $F('fielf15')}
var rq= new Ajax.request(..., params);
Somethig like that.
El 1 de agosto de 2011 09:14, Martín Marqués
On Aug 1, 2011, at 10:14 AM, Martín Marqués wrote:
I have a large form with quite a bunch of pull downs to select. Then a
submit button.
The thing is that there can be up to 1300 vars, and maybe more in the
future, but in every post only 10 or 15 are valid for the program. How
can I eliminate
Hi,
Sounds like some refactoring is in order.
If you're doing an Ajax call, then I'm with Miguel, you can just grab
the fields you really need and send them directly.
If you want it to be a real form post (refreshes the page, etc.), you
could create a new form on-the-fly with the relevant
OK, got it done in another way (I'm not sure if I was clear about what
I wanted).
Form id is formEntrega.
Event.observe(window, 'load', function() {
Event.observe('formEntrega', 'submit', function(event){
var selects = this.getElements();
for(var i=0; i selects.length;
You can make it just selects like this:
if(selects[i].tagName.toUpperCase() === SELECT
selects[i].getValue() == 0){
-- T.J.
On Aug 1, 5:42 pm, Martín Marqués martin.marq...@gmail.com wrote:
OK, got it done in another way (I'm not sure if I was clear about what
I wanted).
Form id is
2011/8/1 T.J. Crowder t...@crowdersoftware.com:
You can make it just selects like this:
if(selects[i].tagName.toUpperCase() === SELECT
selects[i].getValue() == 0){
Shouldn't that be selects.nodeName.toUpperCase() (instead of tagName)?
--
Martín Marqués
select 'martin.marques' || '@'
El día 1 de agosto de 2011 14:06, Martín Marqués
martin.marq...@gmail.com escribió:
2011/8/1 T.J. Crowder t...@crowdersoftware.com:
You can make it just selects like this:
if(selects[i].tagName.toUpperCase() === SELECT
selects[i].getValue() == 0){
Shouldn't that be