Re: Checkbox in datagrid to enable disable textboxes
- From: Dr John Stockton <jrs@xxxxxxxxxxxxxxxxxx>
- Date: Wed, 21 Jun 2006 16:49:54 +0100
JRS: In article <26FCA142-983A-4195-B629-293569FF815B@xxxxxxxxxxxxx>,
dated Tue, 20 Jun 2006 08:54:02 remote, seen in news:microsoft.public.
scripting.jscript, Ben <ben_1_@xxxxxxxxxx> posted :
<script language="javascript">deprecated.
function chkMappedClicked(chkB)
{
debugger;
xState=chkB.checked;
if(xState)
{
//set description to red
chkB.parentElement.parentElement.children.item(2).style.color='r
ed';
//enable text boxes
chkB.parentElement.parentElement.children.item(3).disabled=false
;
...
The following, ISTM, should work. It's quicker to type, quicker to
transmit, easier to read, and probably executes faster. Moreover, you could
maybe set kidsItem instead.
<script type="text/javascript">
function chkMappedClicked(chkB)
{
debugger;
xState=chkB.checked;
if(xState)
{
/***/ var kids = chkB.parentElement.parentElement.children /***/
//set description to red
kids.item(2).style.color='red';
//enable text boxes
kids.item(3).disabled=false;
....
Does not answer your question, though.
--
© John Stockton, Surrey, UK. ?@merlyn.demon.co.uk Turnpike v4.00 IE 4 ©
<URL:http://www.jibbering.com/faq/>? JL/RC: FAQ of news:comp.lang.javascript
<URL:http://www.merlyn.demon.co.uk/js-index.htm> jscr maths, dates, sources.
<URL:http://www.merlyn.demon.co.uk/> TP/BP/Delphi/jscr/&c, FAQ items, links.
.
- Prev by Date: Re: Reading form PUT data
- Next by Date: Re: Checkbox in datagrid to enable disable textboxes
- Previous by thread: Re: Checkbox in datagrid to enable disable textboxes
- Next by thread: Help with treeview node paths??!
- Index(es):
Relevant Pages
|