Velocity Reviews - Computer Hardware Reviews

Velocity Reviews > Newsgroups > Programming > ASP .Net > ASP General > Post recurring checkboxes/radio buttons?

Reply
Thread Tools

Post recurring checkboxes/radio buttons?

 
 
wolfing1@yahoo.com
Guest
Posts: n/a
 
      05-23-2005
I'd like to have an 'approve' and 'reject' option for each record in a
list, and a 'process' button. When this button it's pressed, then it
would post to the same page which would update (or add) records in the
database depending on if the approve or reject option is checked.
Originally, I set up radio buttons with the same name, but obviously,
that didn't work. Then I set checkboxes, which could work (I could
then do a split(request.form("cbox") to process each record I guess),
but can't make it so when I select the 'Approve' checkbox in a row, the
'Reject' checkbox is cleared (I used
onclick="formname.rejected.checked=false" but that didn't do anything).
As you can see I'm rather new at this, what would be a good way to do
what I want (basically, being able to process each record depending on
which checkbox was marked).

 
Reply With Quote
 
 
 
 
Mark Schupp
Guest
Posts: n/a
 
      05-23-2005
If you have more than one checkbox then you access them as an array.
For example, this script sets all the student_id checkboxes in a form:

function selectall(theForm)
{
var i;
var formobj = theForm.student_id;

if( formobj.length == null )
{
//single checkbox
formobj.checked = 1;
}
else
{
//multiple checkboxes
for( i = 0; i < formobj.length; i++ )
{
formobj[i].checked = 1;
}
}
}

You will need to identify the checkbox the changed (or just check them all)
and set or clear the other checkbox accordingly.

You should follow up in a client-side scripting group. You'll probably get
more assistance.

--
--Mark Schupp


<(E-Mail Removed)> wrote in message
news:(E-Mail Removed) oups.com...
> I'd like to have an 'approve' and 'reject' option for each record in a
> list, and a 'process' button. When this button it's pressed, then it
> would post to the same page which would update (or add) records in the
> database depending on if the approve or reject option is checked.
> Originally, I set up radio buttons with the same name, but obviously,
> that didn't work. Then I set checkboxes, which could work (I could
> then do a split(request.form("cbox") to process each record I guess),
> but can't make it so when I select the 'Approve' checkbox in a row, the
> 'Reject' checkbox is cleared (I used
> onclick="formname.rejected.checked=false" but that didn't do anything).
> As you can see I'm rather new at this, what would be a good way to do
> what I want (basically, being able to process each record depending on
> which checkbox was marked).
>



 
Reply With Quote
 
 
 
Reply

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
recurring problem of JMF working only inside Eclipse ted holden Java 0 05-09-2005 10:01 AM
Recurring spyware AK Computer Support 6 10-28-2003 07:30 PM
Recurring problem, getting rid of extra space (no <br>)??? fitwell HTML 2 10-20-2003 01:27 PM
Re: GUI for creating recurring schedule T ASP .Net 1 10-16-2003 06:57 PM
dial up connection box recurring Kevin Speed Computer Support 7 09-16-2003 03:56 PM



Advertisments