jQuery - enable/Devil form textbox on radio button selection

Hello

I can't seam to get my jquery to work.

I have a male and female radio button, and I want the maiden name text box should be disabled when the male is selected and activated when the female is selected.

By default, male is controlled and the maiden name text box is disabled.

Here is what I http://jsfiddle.net/MmgAT/.

Nothing happens when I select female.

I would also like to add and remvoce a class with it. for example add class when the male is selected and remove when the female is selected.

Thank you is advanced.

Try something like:

$("input[name=GenderRadio]").click(function(e) {
            if($("input[name=GenderRadio]:checked").val() == "Female") {
                 $("#maiden-name-input").removeAttr("disabled");
                 // do your removeClass
            } else {
                $("#maiden-name-input").attr("disabled", "disbled");
                // do your addClass
            }
});

--

Kenneth Kawamoto

http://www.materiaprima.co.UK/

Tags: Dreamweaver

Similar Questions

  • Radio button selections does not save

    I'm creating a form of performance review. I have a section where employees need to rate themselves on a scale of 1 to 5. (1 = low, 2 = good, 3 = meets expectations, 4 = exceeds expectations, 5 = outstanding) I radio for each option buttons so that they are allowed to select a. However, when I go in, as the employee to complete the form and select the radio field I want, the selection does not record.

    Is there a way to make sure the radio button selections are saved?

    Or is there a better option?

    Hi kellyr19545348,

    Please save the PDF under the drive extended to allow other users to save the options they are checking.

    Open a PDF in Acrobat

    Go to file > save as other > Reader Extended PDF > allow more tools

    Thank you

    Abhishek

  • Radio button selected user jumps to the text field

    Hello

    Is there a way to blow up a user of a radio button selected in a text field.  For example...

    1. the user will have two options of the radio button.  One option is YES and one option is no.

    2. the user must choose Yes or no (must)

    3. If the user selects YES (radio button), I want the shape of jump them to a text field to fill out additional information.

    I was able to do this with a box, but not the radio button.

    I did research online and via the forums but have not yet found a solution.

    Thanks much for any direction or resources!

    OK, with a checkbox or a radio button, you can use the mouse event to the top, but check the value is different. For the Yes option button where the value of the key (aka export value) is set to 'Yes', you would do something like:

    Script mouse upward to a radio button

    If (event.target.value = 'Yes') {}

    getField("text1").setFocus ();

    }

    Do the same for the box but use the corresponding export value.

  • Prevent Question 2 Radio button selection until Question 1 Radio button selection

    I have a script (Javascript) messagebox to appear if the user tries to make a radio button selection to question 2, when they do not have a selection to question 1. However, the message box does not prevent the selection. the radio button is selected after the messagebox goes. How to prevent this? I tried to focus on the set of question 1 of option buttons, but it does not work.

    You could define question 2 in read-only or protected using 'access', until answered question 1.

  • PHP form validation and Radio button group

    Hi David,

    I'm trying to set the initial state of a group of radio voice against zero.

    Please look at the file http://ecopethandbags.com/contact.php . The initial state is set to 'No'

    In Dreamweaver, I've set the initial state to 'off '.

    I don't understand the code for radio buttons in my folder (see attachment).

    What I'm trying to do is to have the radio initially disabled but necessary task.

    I have 2 questions:

    (1) - how can I control the initial state of the radio group when I use PHP form validation?

    (2) - how can I set the validation, when one of the radio buttons is not verified by the user, a warning flag like "Please make a selection" appears.

    Thank you very much!

    Just change the following section of code:

    
    

    Remove the! $_POST. Like this:

    
    

    Checked = "checked" will be inserted in the code if the form has been sent, but no radio button has been selected.

  • still trying to make more visible radio button selections

    11.1.1.4 forms (us better not know because it is not certified for 2012r2 which is the machine that we could put this on.)  We expect...)

    in when-radio-changed before

    OK after having corrected a mistake big it's the current code:

    It works to set a different color when running a label radio! But there is a problem. I can't seem to

    unplugged the color. When the user selects another radio button colors should change course.

    For some reason any, as I get to the effect that they cannot be changed again. Any ideas?

    Does anyone know how to specify < unspecified > as a color? I tried many things and no

    work.

    declare

    currfield varchar2 (64): =: system.trigger_field;

    Val varchar2 (10): = 0;

    unpickedcolor varchar2 (20): = "r50g75b50";

    pickedcolor varchar2 (20): = "r100g100b100";

    Start

    set_radio_button_property (currfield, 'CONCENTRATE0', BACKGROUND_COLOR, unpickedcolor);

    set_radio_button_property (currfield, 'CONCENTRATE1', BACKGROUND_COLOR, unpickedcolor);

    set_radio_button_property (currfield, 'CONCENTRATE2', BACKGROUND_COLOR, unpickedcolor);

    set_radio_button_property (currfield, 'CONCENTRATE3', BACKGROUND_COLOR, unpickedcolor);

    Val: = trim (name_in (currfield));

    If val = '0' then

    set_radio_button_property (currfield, 'CONCENTRATE0', BACKGROUND_COLOR, pickedcolor);

    elsif val = "1" then

    set_radio_button_property (currfield, 'CONCENTRATE1', BACKGROUND_COLOR, pickedcolor);

    elsif val = "2" then

    set_radio_button_property (currfield, 'CONCENTRATE2', BACKGROUND_COLOR, pickedcolor);

    elsif val = "3" then

    set_radio_button_property (currfield, 'CONCENTRATE3', BACKGROUND_COLOR, pickedcolor);

    end if;

    synchronize;

    end;

    I got it! Many hours trying things, doing really, really, really stupid mistakes, etc. And the answer is below.

    NOTE that it is impossible to change the BACKGROUND_COLOR of the option button, because what happens is the color change _sticks_. (11.1.1.4) if the user has chosen an option button and then selects another so you have two radio buttons that have the selected color and so on. But it happens with VISUAL_ATTRIBUTE is the way to go. Here, I got a Visual attribute (which replaces the background_color) and the font size and the font defined for the radio group and that does not cause a problem. All the radio button properties have the default value and .

    It comes to relax when-radio-changed before status.  CURRENT and SELECTED are defined VISUAL_ATTRIBUTES.

    Now, if only there were an easier way of coding this because having a zillion radio groups this is going to be one heck of a

    a lot of work duty code using hard-coded radio_button_names.

    declare

    currfield varchar2 (64): =: system.trigger_field;

    Val varchar2 (10): = 0;

    Start

    Val: = trim (name_in (currfield));

    set_radio_button_property (currfield, 'CONCENTRATE0', VISUAL_ATTRIBUTE, 'CURRENT');

    set_radio_button_property (currfield, 'CONCENTRATE1', VISUAL_ATTRIBUTE, 'CURRENT');

    set_radio_button_property (currfield, 'CONCENTRATE2', VISUAL_ATTRIBUTE, 'CURRENT');

    set_radio_button_property (currfield, 'CONCENTRATE3', VISUAL_ATTRIBUTE, 'CURRENT');

    If val = '0' then

    set_radio_button_property (currfield, 'CONCENTRATE0', VISUAL_ATTRIBUTE, 'SELECTED');

    elsif val = "1" then

    set_radio_button_property (currfield, 'CONCENTRATE1', VISUAL_ATTRIBUTE, 'SELECTED');

    elsif val = "2" then

    set_radio_button_property (currfield, 'CONCENTRATE2', VISUAL_ATTRIBUTE, 'SELECTED');

    elsif val = "3" then

    set_radio_button_property (currfield, 'CONCENTRATE3', VISUAL_ATTRIBUTE, 'SELECTED');

    end if;

    synchronize;

    end;

  • Adobe Java Script to change the field of reading to write based on radio button selection

    I created a form the question asked is "Do we have a credit limit?" the user can select a Yes or not by using a radio button.  If the user selects Yes we do not have a credit limit that I want the text field "CreditLimitAmount" to change the read only entry.

    Here is my code, but it does not work, someone would be able to see what I'm doing wrong?

    GetField ("CLYes"). Value
    If {(event.target.value==="Off)"}
    f.ReadOnly = false;
    f.fillColor = color.white;

    } else {}

    f.ReadOnly = true;
    f.FillColor = Color.Gray;
    }

    You have it backwards. Use this code as your radio buttons script two MouseUp and remove the code that you have applied to the text field:

    var f = this.getField("CreditLimitAmount");
    if (event.target.value=="CLYes") {
        f.readonly = false;
        f.fillColor = color.white;
    } else {
        f.readonly = true;
        f.fillColor = color.gray;
    }
    
  • Fields of text format based on radio button selection

    (Beginner) I have a form, which one party uses five 5 choice of radio button.  If "Choice5" is selected, I want to field 'X' (in the form) to display a red border.

    I need assistance with the JavaScript code for this action.

    Thank you!

    A minor change...

    "this.getField("X").strokeColor = event.target.valueAsString =='choice5 '? Color.Red: color.black;

    ... and it worked.

    Gilad thanks D!

  • The use of JavaScript with radio buttons selected to assign a variable a value

    Hey everyone, a little new in Java and try to create a form for my work to request leave.  My problem is that I'm trying to assign a variable a value if the user clicks on a radio button or another.  Currently, they are incompatible with the following information:

    Name: Radio

    ToolTip: choice

    Button Style: check

    Radio button choice: Yes (this is the value of exports, that I think that I'm not sure how to use it correctly)

    nor is checked by default, but if a box is checked, I would have a variable defined on the "Approved" text, and if the other radio button is checked I would define the variable contains "disapprove".

    Here is my code now and thanks in advance for all the help:

    var S_auth;

    function auth() {}

    If (Radio.value == 'Yes') {}

    var S_auth = "approved";

    }

    else {}

    var S_auth = 'denied ';

    }

    }

    var employees = this.getField("Emp_Name").value;

    Supervisor of var = this.getField("Supervisor").value;

    var Leave_Type = this.getField("Dropdown2").value;

    var cToAddr = [email protected];

    var cCCADDr = this.getField("Email").value;

    var cBenAddr = this.getField("Sup_Email").value; If (cBenAddr! = "") cCCADDr += ';' + cBenAddr;

    var cSubline = "Re: leave request form for" + "" + employee + ', ' + Leave_Type + ', Status: "+ S_auth;"

    cbody var is 'your request for leave was' + S_auth + 'by' + supervisor. \n' + 'save the attachment of e-mail for your records. \n » ;

    this.mailDoc({)

    bUI: true,

    cTo: cToAddr,.

    cCc: cCCAddr,.

    bassujetti: cSubLine,

    CMSG: cbody

    });

    I honestly just want to have the subject line and the body to be able to show approved or disapproved according to which radio button, the project manager chooses.

    Yes, your script is now correct and should work.

  • Change the background fill color based on Radio button selections

    Hello

    I am very new script in LC, so I hit a wall on my last form. I am creating a form with a scale of 'leikert-like', however one of the stipulations (from my boss) is in this context of buttons are to be filled based radio which button is selected.

    For example, Question 1 has 4 radio buttons to choose: poor, fair, good, great. If the person completing the form selects poor, I wish the poor to fill background color. If someone chooses right, I would like to than this background color to be filled, as well as the background of the poor. Good selection would fill the colors of good, fair and poor; and selecting the big would fill the four colors.

    Someone has ideas of how / if possible? In my first tests, I got the button itself to change the colors, but not the background fill (which can be changed manually on the border palette).

    Any ideas would be much appreciated. Thank you!

    Aaron

    Here is the code that you can use in the event of modification of the ExclusionGroup (title default RadioButtonList) object. It is the parent of each individual option button object.

    for (var i=0;i
    

    This also assumes that the value of each option button is sequentially numbered from 1 to however many boxes option you have.

    Now, here's the thing. I'm assuming that each radio button has a different color. You might code for the colors yourself in JavaScript, but I manually chose the colors through UI Designers. Once all the colors of radio buttons have been defined, select a radio button and go see > XML Source. Where we see the element, add the presence of the attribute = "hidden". Do this for each option button. Here's what I mean:

                      
                      
                         
                          
                            
                         
                      
                      
    

    Kyle

  • Status field change based on Radio button selection

    I have a form that has a text field 'Status' and several radio buttons named: submitted for approval, approved, not approved, items received and distributed.  I need the status of self serve option button is selected.

    For example, when the 'Submit for approval' option button is selected, I want the State to be "Submitted for approval", then when the 'Authorized' option button is selected, I want to be "authorized" status and so on.  How can I do this?

    Thank you!

    Here is one approach.

    Steve

  • Radio button selection exclusive

    I have a PDF (v9) form in which I would like the user to indicate their satisfaction with each of the 5 topics on a scale of 1 to 10.

    I accomplished this by having each subject on its own line followed in a series of 10 numbered from 1 to 10.

    I would like all the buttons 10 radio for a subject to be mutually, but I want the user to be able to select 1 theme radio button. If the user selects a different radio on the same button as the selected option button previously is automatically deselect.

    I wish that each of the five themes to work in this way independently of each other.

    Please notify.

    Give 10 boxes of the same name.

  • A loop via the instance manager and check radio button selected

    I need the loop through my case and toggle visible/hidden if a particular option in each instance button is selected.

    My code doesn't work right now, but I feel that I am on the right track (less the else statement, that will require alternate power).

    Can anyone help? Thanks in advance!

    var rowCount = BugGroup_f.instanceManager.count;

    for (i = 0; i < rowCount; i ++) {}


    var str = xfa.resolveNode("BugGroup_f.detail3.bugInfo.BugItem.status.RadioButtonList["_+_i_+_"]").rawValue;

    If (str.indexOf ("Fixed") >-1) {}
    xfa.resolveNode("BugGroup_f["+rowCount+"]").presence = "hidden".

    }
    }

    Well Yes, if the exact logic that are hidden or unhidded can be tweeked as you wish.

    That code correct will hide (or leave hidden) any line that has the radio button is set to hide. Allowing you to call with a reset (1) value that will display all the lines reguardless.

    If you want different logic than that, it's just a matter of what you put inside the loop for and can be as complex as you want.

    EDIT:

    To add a script object, right-click on the top shape in the hierarchy window and choose "add script object.

    It will be a subject without name down below (under the "variables") and you can put any code in there that you like, in the form of "function".

    then to run the code, you reference the function by name of certain form events, and you're off to the races, so to speak.

  • How to manage the current line with radio button selection?

    Hello world

    I have an ADF page with a table and a search"" button.
    I created a new attribute with VARCHAR2 (1) in the VO and dragged this attribute as the first column of the table. And changed this first column of the option button to select only a single line at a time.
    By clicking on the "Search" button, I need to get the current selected row values.

    How can I get the values of selected line?
    What code should I write to get the values of the selected line in the method of binding the button 'search '?

    All suggestions will be really useful.

    Thank you.

    Hello Kumar,
    I have a few comments on your case.
    >
    I created a new attribute with VARCHAR2 (1) in the t
    >
    1. you should create this attribute in the object of the entity, and then add it to the view object.
    2-do you need this radio that a button is defined for all lines? If yes then you need handle the case where the user set several lines and clear the value of the attribute for all other lines.

    >
    How can I get all the values of the current row in backing bean, binding of the Find method (method)?
    can u please give me the code for this?
    >
    If you mean by the current row is the row for which the value of the selected attribute is defined (the radio button is set to the rank), then you can write a method in the viewObjectImpl class and expose it to the customer interface and call it from your bean.
    Here is a sample Department table in the HR schema.

    //This method is written in DepartmentsViewImpl
    public Row getSelectedRadioRow(){
                //create a second row set to not impact the row set used in ADF
                RowSet duplicateRowSet = this.createRowSet("duplicateRowSet");
                //get the current row of the table to set it back after re-executing the VO
                DepartmentsViewRowImpl currentRow = (DepartmentsViewRowImpl)this.getCurrentRow();
                Row[] filteredRows = duplicateRowSet.getFilteredRows("IsSelected", "1");
                DepartmentsViewRowImpl row=null;
                if(filteredRows.length>0){
                    row = (DepartmentsViewRowImpl)filteredRows[0];
                    System.out.println("Department Name " + row.getDepartmentName());
                     }
                this.setCurrentRow(currentRow);
                duplicateRowSet.closeRowSet();
                return row;
            }
    
  • Average of the radio button selections, but exclude the equation 0

    This should be simple.  I've seen a lot of posts which should have led me to a Twitter.com response, but I still have trouble.

    Here we go:

    (1) I have 9 groups of radio buttons named: GMR1. 1_Score; GMR1. 2_Score; GMR1. 3_Score; GMR1. _Score 4; GMR1. 5_Score; GMR1. 6_Score; GMR1. 7_Score; GMR1. 8_Score; GMR1. 9_Score

    (2) each group of option buttons buttons 4 with the same values in each group:

    • "NA" where I put the Radio button choices under the Options tab = 0
    • "Fair" where I put the button choice Radio under the Options tab = 1
    • 'Good' where I put the Radio button choices under the Options tab = 2
    • 'Great' where I put the Radio button choices under the Options tab = 3

    Thus, the shape looks like a little at:

    GMR1. 1_Score

    • NA
    • Just
    • Good
    • Large

    GMR1. 2_Score

    • NA
    • Just
    • Good
    • Large

    and so on.  The user chooses a 1 option for each question.

    My goal is to get an average that excludes the selections of NA.  Compared with this average, I want to assign the specific text to appear.

    If I did it in 2 steps in excel, my formulas could look like:

    C7 = SUM (range) / COUNTIF (range, "> 0")

    = IF (C7 < 2, "overall score is fair, IF (C7 < 3, 'Overall rating is good', IF (C7 > = 3,"overall score is great!")))

    I think to that the following should work to count all selections does not match "NA" by excluding getField ("GMR1." + i + "_Score") .value == 0 a counter like the one below, but it is not!

    (The here's how I'm playing the part of the excel formula COUNTIF)

    ****************************

    var counter = 0;

    for (i = 0; i < = 9; i ++)

    {

    If (getField ("GMR1." + i + "_Score") .value == 1) counter ++;

    If (getField ("GMR1." + i + "_Score") .value == 2) count ++;

    If (getField ("GMR1." + i + "_Score") .value == 3) counter ++;

    }

    If (counter > 0) {}

    Event.Value = counter;

    } else event.value = "";

    ****************************

    The Sum (range) is simple enough using the "value is the sum "on the calculation of the properties of the text box tab.» But if I wanted, it's all happening in a block of code, then that won't work for me.

    ****************************

    The assignment of text based on the value average; I haven't got there yet.

    ****************************

    Help, please.  There must be a way to do all this in a fairly simple code that is simply eluding me.

    See if to change this instructs the following assistance:

    for (i = 1; i< 10;="" i++)="">

    It should have been an error in the JavaScript (Ctrl + J) console which provides clues as to what is wrong.

Maybe you are looking for