Wrox Programmer Forums

Need to download code?

View our list of code downloads.

| FAQ | Members List | 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 tens of thousands of software programmers and website developers including Wrox book authors and readers. As a guest, you can read any forum posting. By joining today you can post your own programming questions, respond to other developers’ questions, and eliminate the ads that are displayed to guests. Registration is fast, simple and absolutely free .
DRM-free e-books 300x50
Reply
 
Thread Tools Search this Thread Display Modes
  #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
Reply With Quote
  #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???
Reply With Quote
Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Trackbacks are Off
Pingbacks are On
Refbacks are Off


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



All times are GMT -4. The time now is 01:30 PM.


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