Solved

update Check box

Posted on 2004-09-03
9
355 Views
Last Modified: 2013-12-24
I have an asp page that shows the results of a table query for orders.  One of the fields 'completed'  is a YES/NO checkbox or could be a text box.  I would like to be able to show it in the results as a checkbox  either checked or unchecked depending on what the value is from the table, and then from the asp results page be able to go through my list of orders and select which ones are completed and submit them all at once to change the completed status.  Please include sample code.

Thanks
0
Comment
Question by:pmathis
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 5
  • 4
9 Comments
 
LVL 12

Expert Comment

by:rcmb
ID: 11978328
Okay, I understand what you need and I have some sample code for you to test out.

First thing I need to know is do you desire this to happen on one page or can you display the results and then submit the form to another page?

Second, how are you getting to the page displaying then information? and does your query displaying the results limit the records returned, for example are you displaying information for just this month?

RCMB
0
 
LVL 12

Accepted Solution

by:
rcmb earned 500 total points
ID: 11978661
I have a working sample for you to view. Go to this site and test it out. There is only data available in Jan-Aug so feel free to play as much as you like.

http://www.lilmga.com/doctor/DemoPages/form_demo1.htm

You can download the two pages from the first page.

RCMB
0
 

Author Comment

by:pmathis
ID: 11997771
Just got in, Looks great let me take a look at the demo files
0
Free learning courses: Active Directory Deep Dive

Get a firm grasp on your IT environment when you learn Active Directory best practices with Veeam! Watch all, or choose any amount, of this three-part webinar series to improve your skills. From the basics to virtualization and backup, we got you covered.

 

Author Comment

by:pmathis
ID: 12000528
is there a way to make it so that if you uncheck it it will change the value back?
0
 

Author Comment

by:pmathis
ID: 12001982
Could we have 2 check boxes that would each control a different field?
0
 
LVL 12

Expert Comment

by:rcmb
ID: 12002022
We could certainly have two boxes - a complete or not complete box. Changing the value back is somewhat difficult because you would not be able to pass a value on a box that is not checked.

I think the best in this case would be to use radio buttons. The buttons would be with comp or not comp. You could then have this pass the value of the radio button to the database and it would always update all of the records displayed because you are always returning a specific state.

I love the way EE works -- you answer a question and there is always three more to follow :-). I learned most of what I know by asking questions in EE. Let me know what you think about the radio buttons and I will see if I can put something together.


RCMB
0
 

Author Comment

by:pmathis
ID: 12002258
If you could that would be great, if its too much trouble then I will give you the points.  I got it working with two check boxes and really
appreciated the code.

Thanks

0
 
LVL 12

Expert Comment

by:rcmb
ID: 12002610
Okay go back to the site and check out the radio button options. You will see that where you select yes it changes the values to 100 and if you select No it changes the values to 200. This will work for you to set the information to complete or not complete.

Pay attention to the If statement inside the form that sets the values of the checked radio button.

RCMB
0
 

Author Comment

by:pmathis
ID: 12007825
I'm using the checkboxes, I'll see if the radio buttons will work.
Thanks
0

Featured Post

Windows Server 2016: All you need to know

Learn about Hyper-V features that increase functionality and usability of Microsoft Windows Server 2016. Also, throughout this eBook, you’ll find some basic PowerShell examples that will help you leverage the scripts in your environments!

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Now that Expression Web 4.0 (http://www.microsoft.com/expression/products/Upgrade.aspx) is free if you buy or have the full version of Expression Web 3.0, now is the best time to  migrate from FrontPage to Expression Web (http://www.frontpage-to-exp…
This guide will walk you through the essential considerations and tech stack for building scalable websites. Know how to grow your business the smart way!
The purpose of this video is to demonstrate how to exclude a particular blog category from the main blog page. This is can be used when a category already has its own tab, or you simply want certain types of posts not to show up on the main blog. …
The purpose of this video is to demonstrate how to set up an RSS Feed on a WordPress Website. This will be demonstrated using a Windows 8 PC. Feedburner will be used for this demonstration. Go to your WordPress login page. This will look like the…

751 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question