Client Side "Check All" script 
Author Message
 Client Side "Check All" script

Need help checking a check box at runtime. I've tried all of the following
client side

chkBox.value = true
chkBox.value = vbChecked
chkBox.checked = true

Any ideas?

--
Barry Lenard
a.k.a. OilerGuy
co-webmaster: http://www.*-*-*.com/



Fri, 05 Jul 2002 03:00:00 GMT  
 Client Side "Check All" script

CHECKED Attribute | checked Property
http://msdn.microsoft.com/workshop/author/dhtml/reference/properties/...

Assuming you mean an HTML <input type=checkbox ...> element,

document.forms.myform.chkBox.checked = true

should work.

--
Michael Harris


  Need help checking a check box at runtime. I've tried all of the following
  client side

  chkBox.value = true
  chkBox.value = vbChecked
  chkBox.checked = true

  Any ideas?

  --
  Barry Lenard
  a.k.a. OilerGuy
  co-webmaster: http://www.thinblueline.net



Fri, 05 Jul 2002 03:00:00 GMT  
 Client Side "Check All" script

Quote:

>Need help checking a check box at runtime. I've tried all of the following
>client side

>chkBox.value = true
>chkBox.value = vbChecked
>chkBox.checked = true

Barry,
Here is an example with both VB and JavaScript. Both works for me!
BR, Kimmo

<HTML>
<HEAD>
<TITLE>Check a Box</TITLE>
</HEAD>

<BODY>

<SCRIPT LANGUAGE="JavaScript1.2">
<!--
function check_it()
{
 cb_test.checked = !cb_test.checked;
 return true;

Quote:
}

-->
</SCRIPT>

<SCRIPT language = "VBScript">
<!--
sub checkIt
   cb_test.Checked = NOT cb_test.Checked
end sub
-->
</SCRIPT>

<INPUT TYPE=checkbox NAME=cb_test >CheckBox</INPUT><BR>
<INPUT TYPE='SUBMIT' VALUE='Click Me to Check/Uncheck (VBScript)!'
onClick="checkIt()"></INPUT><BR>
<INPUT TYPE='SUBMIT' VALUE='Click Me to Check/Uncheck (JavaScript)!'
onClick='checkIt();'></INPUT>
</BODY>
</HTML>



Sun, 07 Jul 2002 03:00:00 GMT  
 Client Side "Check All" script
Try doing the following:

Form1.chkBox.checked = 'true'

I got mine to work by using OnClick="Form1.chkBox.checked = 'true',..."

Good luck.  Do you happen to know how to UNcheck all?

Form1.chkBox.checked = 'false'  DOESNT WORK!!!

Thanx,

TheBatman12

* Sent from RemarQ http://www.remarq.com The Internet's Discussion Network *
The fastest and easiest way to search and participate in Usenet - Free!



Sun, 14 Jul 2002 03:00:00 GMT  
 
 [ 4 post ] 

 Relevant Pages 

1. Going "Back" in server-side script

2. ASP referring to server side variables in client side script

3. Client side and Server side script working together

4. Check "LOGON" Users

5. Check "LOGON" User Group

6. Disabling "BACK"/"FORWARD" buttons

7. CreateObject("Excel","//server"), MsgBox output

8. Problem With "window.showmodaldialog("")"

9. Disabling "BACK"/"FORWARD" buttons

10. Client side scripting / server side scripting

11. Accessing Data generated with client-side script from server-side script

12. Calling Server Side Script from Client Side Script

 

 
Powered by phpBB® Forum Software