Wrox Programmer Forums
|
Classic ASP Databases Discuss using ASP 3 to work with data in databases, including ASP Database Setup issues from the old P2P forum on this specific subtopic. See also the book forum Beginning ASP.NET Databases for questions specific to that book. NOT for ASP.NET 1.0, 1.1, or 2.0.
Welcome to the p2p.wrox.com Forums.

You are currently viewing the Classic ASP Databases section of the Wrox Programmer to Programmer discussions. This is a community of software programmers and website developers including Wrox book authors and readers. New member registration was closed in 2019. New posts were shut off and the site was archived into this static format as of October 1, 2020. If you require technical support for a Wrox book please contact http://hub.wiley.com
 
Old January 28th, 2005, 05:15 AM
Authorized User
 
Join Date: Dec 2004
Posts: 47
Thanks: 0
Thanked 0 Times in 0 Posts
Default checking which checkbox checked

HI GUYS OF PROX COMMUNITY....

  i have a doubt regarding checkbox...
i have dynamic number of checkboxes ... ie the number varies periodically.
my querry is when i click the particular checkbox the checkbox has to be disabled..

remember no multiple names.
i have a checkbox creation in a loop so i am not having multiple name values.
so how can i check whether the particular box has been clicked..

tell me quick...


MuthuKumar.AL
__________________
MuthuKumar.AL
 
Old January 28th, 2005, 06:48 AM
Friend of Wrox
 
Join Date: Oct 2003
Posts: 326
Thanks: 0
Thanked 0 Times in 0 Posts
Send a message via ICQ to Santhi Send a message via MSN to Santhi
Default

I havent tried this..But onChecked event write this.Checked = true and check.

 
Old January 28th, 2005, 07:41 AM
Friend of Wrox
 
Join Date: Oct 2003
Posts: 479
Thanks: 0
Thanked 3 Times in 3 Posts
Send a message via MSN to surendran Send a message via Yahoo to surendran
Default

hi
use this like
document.getElementbyId("checkboxname").disabled=" true"

surendran
(Anything is Possible)
 
Old January 28th, 2005, 02:02 PM
Friend of Wrox
 
Join Date: Oct 2003
Posts: 326
Thanks: 0
Thanked 0 Times in 0 Posts
Send a message via ICQ to Santhi Send a message via MSN to Santhi
Default

Hi,
   He is dynamically creating the checkbox and how he will know the checkbox name...It varies periodically also..

Quote:
quote:Originally posted by surendran
 hi
use this like
document.getElementbyId("checkboxname").disabled=" true"

surendran
(Anything is Possible)
 
Old February 1st, 2005, 02:37 AM
Authorized User
 
Join Date: Dec 2004
Posts: 12
Thanks: 0
Thanked 0 Times in 0 Posts
Default

try with eval() function in javascript. u can pass the control name to this function and get the value of the control.

by
murali.

 
Old February 1st, 2005, 05:19 AM
Authorized User
 
Join Date: Jan 2005
Posts: 16
Thanks: 0
Thanked 0 Times in 0 Posts
Default

On the click event of check box u have to call a function "fnDisable" and pass parameter "this"

<nmae="A1" type="checkboix" OnClick="fnDisable(this);">

<Script>
 fnDisable(e)
 {
  e.disabled="true"
 }
</script>


Amit Jain
Sr. Software Engineer





Similar Threads
Thread Thread Starter Forum Replies Last Post
Checkbox checked all mateenmohd Javascript 1 January 2nd, 2007 06:19 AM
checkbox checked by default by html:checkbox sachin.tathod Struts 3 December 4th, 2006 03:41 PM
Checkbox checked? ninel ASP.NET 2.0 Professional 1 April 12th, 2006 10:50 PM
allow only one checkbox to be checked! morpheus HTML Code Clinic 5 April 15th, 2004 10:59 AM
Display Checkbox if checked or not jmss66 Classic ASP Basics 6 January 23rd, 2004 11:19 AM





Powered by vBulletin®
Copyright ©2000 - 2020, Jelsoft Enterprises Ltd.
Copyright (c) 2020 John Wiley & Sons, Inc.