Re: Checkbox in datagrid to enable disable textboxes



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.
.



Relevant Pages

  • Re: aspnet_wp.exe weirdness
    ... I've posted a screenshot at ... Note that both of the boxes you ... The ASP.NET app is running, ... Also notable is the fact that the debugger ...
    (microsoft.public.dotnet.framework.aspnet)
  • Re: Off Topic... small power supply hell.
    ... It may be quicker to go here ... the + connection on the shell. ... >>I forgot to mention the plug polarity in my response. ... somewhere in all these boxes.:) ...
    (rec.woodworking)
  • Re: w98 - Systray Icon for LAN Ethernet NIC Network thingy?
    ... > liked an Icon to be there, so that the Network Status & Properties ... > Dialog Boxes could be got to quicker. ... Drag a shortcut to the desktop? ...
    (uk.people.silversurfers)
  • Re: TextBox Focus Problem
    ... Put a breakpoint on every statement in your code that says "txtNumber.Focus ... = True" and run it in the debugger and see what happens. ... >>text boxes. ... Prev by Date: ...
    (microsoft.public.dotnet.framework.compactframework)
  • Re: Girl Scout cookies
    ... 37 boxes and give half of one away. ... Some of them go quicker than a week. ... weeks (like around Christmas) I bake so many darned cookies that the ... maxine in ri ...
    (rec.food.cooking)