Re: Checkbox Array
From: WC Justice (WCJEInc_at_bellsouth.net)
Date: 08/04/04
- Next message: Scotter: "Re: putting a pause into ASP?"
- Previous message: David Morgan: "Re: Checkbox Array"
- In reply to: David Morgan: "Re: Checkbox Array"
- Next in thread: David Morgan: "Re: Checkbox Array"
- Reply: David Morgan: "Re: Checkbox Array"
- Messages sorted by: [ date ] [ thread ]
Date: Wed, 4 Aug 2004 16:40:02 -0500
Thanks for the quick reply.
I'm thinking that I could add a hidden box to each row with a value of 0 or
1 and that can be updated with the onChange event in javascript. That way I
will still have the user-friendly checkbox and all records would have a
corresponding value to be counted and used to direct subsequent code. Does
that sound like it might work?
"David Morgan" <david@davidmorgan.me.uk> wrote in message
news:uDqa0gmeEHA.1356@TK2MSFTNGP09.phx.gbl...
> No.
>
> With radios, check boxes and buttons, only the values of selected, (or
> clicked), elements are submitted.
>
> You could re-run the query in the "post-to" page and loop through the
> recordset saying
>
> If (Request.Form("cbxAddToInvoice_" & objRs.Fields("ID").Value).Count Then
> ' Update to true
> Else
> ' Update to false
> End If
>
> Note you would need to change the name of the checkboxes on the original
> page to incorporate the ID of the record the checkbox represents. You
> probably have this in the checkboxes' value field at the moment. You can
> change the value field to anything then.
>
> Regards
>
> David
>
>
> "WC Justice" <WCJEInc@bellsouth.net> wrote in message
> news:j%aQc.836$zJ4.247@bignews1.bellsouth.net...
> > I have an ASP form that uses a recordset to build a table, with one of
the
> > columns containing a checkbox. Upon posting, the ASP code of the
Post-To
> > page uses the "For i = 1 to request.form("chkAddToInvoice").count"
method
> to
> > go through the array, but it only counts checked boxes. Not only is
this
> > causing the corresponding Update statement to write values to the wrong
> > records, it is preventing me from using the "False" value of the check
box
> > to run its corresponding Update statement.
> >
> > Is there a way to set up the checkbox so that it is counted whether it
is
> > selected or not?
> >
> >
>
>
- Next message: Scotter: "Re: putting a pause into ASP?"
- Previous message: David Morgan: "Re: Checkbox Array"
- In reply to: David Morgan: "Re: Checkbox Array"
- Next in thread: David Morgan: "Re: Checkbox Array"
- Reply: David Morgan: "Re: Checkbox Array"
- Messages sorted by: [ date ] [ thread ]