Re: loop over form objects - using JavaScript - Client Validation

2004-11-17 Thread Ron Gowen
; > > > > > > > > > > FORM.FLD_#i# = #form['fld_' & i]# > > > > > > You would just use currentrow or a recordID in your query loop rather than > > an index. > > > > > > > > > > -Original Messa

Re: loop over form objects - using JavaScript - Client Validation

2004-11-17 Thread Greg Morphis
I adapted your function to work... for(i=#sweeps.minval#;i <= #sweeps.maxval#; i++) { if(document.forms['sweeps'].elements['r_'+i].checked) { return true; } } alert('you haven\'t selected anyth

Re: loop over form objects - using JavaScript - Client Validation

2004-11-17 Thread Greg Morphis
my elements are named differently. the first checkbox for example is r_20, next is r_21, r_22, r_23, etc. Will this work with that in mind? On Wed, 17 Nov 2004 14:32:35 +0100, Micha Schopman <[EMAIL PROTECTED]> wrote: > This line should be different.. made a typo > > if(document.forms['formname

RE: loop over form objects - using JavaScript - Client Validation

2004-11-17 Thread Micha Schopman
This line should be different.. made a typo if(document.forms['formname'].elements['elementname'][i]){ Must be if(document.forms['formname'].elements['elementname'][i].checked){ You are checking for the bool checked.. Micha Schopman Software Engineer Modern Media, Databankweg 12 M, 3821 AL A

RE: loop over form objects - using JavaScript - Client Validation

2004-11-17 Thread Micha Schopman
That is pretty basic stuff.. var i=document.forms['formname'].elements['elementname'].length; while(i--){ if(document.forms['formname'].elements['elementname'][i]){ return true; } } alert('you haven\'t selected anything.. '); return false; Micha Schopman Softw

Re: loop over form objects - using JavaScript - Client Validation

2004-11-17 Thread Greg Morphis
ORM.FLD_#i# = #form['fld_' & i]# > > > You would just use currentrow or a recordID in your query loop rather than > an index. > > > > > -Original Message----- > From: Greg Morphis [mailto:[EMAIL PROTECTED] > Sent: Tuesday, November 16, 2004

RE: loop over form objects

2004-11-16 Thread Ewok
F-Talk Subject: loop over form objects I have a page with X number of check boxes on it. I have a query which generates these check boxes. The query also returns the min and max value of the ID for those check boxes. Basically creating r_23 r_24 r_25 r_26 ... and so forth. I'm trying to loop o

Re: loop over form objects

2004-11-16 Thread Charlie Griefer
form['r_' & i] On Tue, 16 Nov 2004 13:34:00 -0600, Greg Morphis <[EMAIL PROTECTED]> wrote: > I have a page with X number of check boxes on it. > I have a query which generates these check boxes. > The query also returns the min and max value of the ID for those check boxes. > Basically creating >

loop over form objects

2004-11-16 Thread Greg Morphis
I have a page with X number of check boxes on it. I have a query which generates these check boxes. The query also returns the min and max value of the ID for those check boxes. Basically creating r_23 r_24 r_25 r_26 ... and so forth. I'm trying to loop over these fields to check to see if none are