Wrox Programmer Forums
| Search | Today's Posts | Mark Forums Read
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
  #1 (permalink)  
Old October 15th, 2008, 10:23 AM
Registered User
 
Join Date: Aug 2008
Location: Chennai, Tamilnadu, India.
Posts: 2
Thanks: 0
Thanked 0 Times in 0 Posts
Send a message via MSN to ashfaqshariff2007
Default Radio Button[When it is checked]

when the radio childcontrol radio button is checked then the parent radio button should get selected and the corresponding value of dropdown should get selected.

here is the code...but i am getting error in this can any one correct this code



function jsCboHnler476TP(childCtrl) // combobox eventhandlers e.g.--> select_1_P_4_closing, select_1_C_4_abc
    {
        //alert(childCtrl);
        var parentFlag, tempValue, parentCtrl, selectFlag;
        var ctrlname, ctrlChecker, tempChkr1, tempChkr2,vartdclsname;

        parentFlag = 'NA';
        selectFlag = 'false';
        ctrlChecker = childCtrl.substr(0,13);

        alert(childCtrl.substr(0,13));
        tempChkr1 = childCtrl.substr(0,9);
        tempChkr2 = childCtrl.substr(10,3);


        for (var ictrls=0;ictrls<frmGenAuditMain.length;ictrls++)
        {
            if (document.frmGenAuditMain.elements[ictrls].type == 'select-one')
            {
                ctrlname = document.frmGenAuditMain.elements[ictrls].name;
                if((ctrlname.substr(0,7) == 'select_') && (ctrlname.substr(8,3) == '_C_'))
                {
                    if(ctrlChecker == ctrlname.substr(0,13))
                    {
                        tempValue = eval('document.frmGenAuditMain.'+ ctrlname +'.options[document.frmGenAuditMain.'+ ctrlname +'.checked]' == true)
                        switch (tempValue)
                        {
                            case 'No':
                                parentFlag = 'No';
                                break;
                            default:
                                break;
                        }
                    }
                    else if ( (ctrlname.substr(0,9) == tempChkr1) && (ctrlname.substr(8,3) == '_P_') && (ctrlname.substr(10,3) == tempChkr2))
                    {
                        parentCtrl = ctrlname;
                    }
                }
            }
        }
        if (parentFlag == 'No'){jsDisableCombo3 (parentCtrl,2);}
        else {jsDisableCombo3 (parentCtrl,0);}

    }


-->This is used to select the controls

function jsDisableCombo3 (ctrlname,index)
    {
        eval('document.frmGenAuditMain.' + ctrlname + '.selectedIndex = ' + index);
        dotxtChangeScore(('group'+ ctrlname),ctrlname);
    }

Mohammed Ashfaq Shariff.A
  #2 (permalink)  
Old October 15th, 2008, 02:09 PM
Friend of Wrox
 
Join Date: Jun 2008
Location: Snohomish, WA, USA
Posts: 1,649
Thanks: 3
Thanked 141 Times in 140 Posts
Default

No way anybody could debug just this JS code without seeing the rest of the HTML on the page.

Can you just give us the URL of the problem page???


Similar Threads
Thread Thread Starter Forum Replies Last Post
put checked radio ID separated by a specified deli kumiko Javascript 1 January 28th, 2008 05:39 AM
check if a radio button has been checked crmpicco Javascript How-To 0 October 13th, 2005 09:53 AM
if radio button is checked crmpicco Javascript How-To 2 March 31st, 2005 05:10 PM
My Radio Button is not checked goplayoutside VB.NET 2002/2003 Basics 4 May 8th, 2004 12:46 AM
Button acts depending on radio button values janise Access 4 March 10th, 2004 12:53 AM





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