Click here to Skip to main content
12,998,759 members (70,518 online)
Rate this:
Please Sign up or sign in to vote.
See more:
Dear Sir / Madam ,

Good Afternoon ,

I have problem with following codes ,

JSF :-

<rich:comboBox id="RelationShip" valueChangeListener="#{memberBean.relationshipChanged}"
    enableManualInput="true" directInputSuggestions="true"
     <a4j:support event="onselect" ajaxSingle="true" reRender="ContactPersonGender" />

<rich:comboBox id="ContactPersonGender"
                                        enableManualInput="false" directInputSuggestions="true"

JS Code for Validation :--

function validateRelationshipGender() {
        var gender, genderForm;
        gender = document.getElementById("NewUser:ContactPersonGender").value;
        genderForm = document.getElementById("NewUser:ContactPersonGender").disabled = true;
        if (gender == "Male" || gender == "Female") {
            genderForm = document.getElementById("NewUser:ContactPersonGender").disabled = false;


Validation is not working for me , gender values comes form table , and relationships from bean.

What i need means once i select relationships it take some time to come value from bean,in that processing time i want disable and enable that gender drop-down box

My problem is while i give JS validation its not working , once i removed validation code its working fine ,

Give some guidance to proceed further ,

Thanks in advance ,

Sankar .
Posted 14-Oct-12 20:59pm

1 solution

Rate this: bad
Please Sign up or sign in to vote.

Solution 1

Add following statement in function
return false ;

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)

  Print Answers RSS
Top Experts
Last 24hrsThis month

Advertise | Privacy | Mobile
Web02 | 2.8.170622.1 | Last Updated 15 Oct 2012
Copyright © CodeProject, 1999-2017
All Rights Reserved. Terms of Service
Layout: fixed | fluid

CodeProject, 503-250 Ferrand Drive Toronto Ontario, M3C 3G8 Canada +1 416-849-8900 x 100