+ Start a Discussion
Renu KyalRenu Kyal 

JQuery OnLoad function not getting called in Partner communtiy

<script>
   
     $(function() {
       
        if(!$('[id$="enableEstimatedSalesDate"]').attr('checked')){
            $('[id$="estimatedSalesDate"]').attr('disabled', 'disabled');
        }
        if(!$('[id$="enableOpportunityStep"]').attr('checked')){
            $('[id$="opportunityStep"]').attr('disabled', 'disabled');
        }
        if(!$('[id$="enableOrderForecastCategory"]').attr('checked')){
            $('[id$="orderForecastCategory"]').attr('disabled', 'disabled');
        }
        if(!$('[id$="enableTerm"]').attr('checked')){
            $('[id$="term"]').attr('disabled', 'disabled');
        }
        if(!$('[id$="enableNextSteps"]').attr('checked')){
            $('[id$="nextSteps"]').attr('disabled', 'disabled');
        }
        if(!$('[id$="enableDescription"]').attr('checked')){
            $('[id$="description"]').attr('disabled', 'disabled');
        }
        //Tender related Checkboxes sync with Tender related fields
        if(!$('[id$="enableTenderName"]').attr('checked')){ 
            $('[id$="tenderName"]').attr('disabled', 'disabled');
        }
        if(!$('[id$="enableTenderAnnouncementDate"]').attr('checked')){
            $('[id$="tenderAnnouncementDate"]').attr('disabled', 'disabled');
        }
        if(!$('[id$="enableTenderStatus"]').attr('checked')){
            $('[id$="tenderStatus"]').attr('disabled', 'disabled');
        }       
        if(!$('[id$="enableTenderType"]').attr('checked')){
            $('[id$="tenderType"]').attr('disabled', 'disabled');
        }
        if(!$('[id$="enableGEBidDecision"]').attr('checked')){
            $('[id$="geBidDecision"]').attr('disabled', 'disabled');
        }
        if(!$('[id$="enablePrimaryReasonForNoBid"]').attr('checked')){
            $('[id$="primaryReasonForNoBid"]').attr('disabled', 'disabled');
        }
        if(!$('[id$="enablesalesForecastCategory"]').attr('checked')){
            $('[id$="salesForecastCategory"]').attr('disabled', 'disabled');
        }
        if(!$('[id$="enableOrderAtRisk"]').attr('checked')){ 
            $('[id$="orderAtRisk"]').attr('disabled', 'disabled');
        }
        if(!$('[id$="enableTenderLink"]').attr('checked')){
            $('[id$="tenderLink"]').attr('disabled', 'disabled');
        }
        if(!$('[id$="enableTenderDueDate"]').attr('checked')){
            $('[id$="tenderDueDate"]').attr('disabled', 'disabled');   
        }
        if(!$('[id$="enableTenderResultDate"]').attr('checked')){
            $('[id$="tenderResultDate"]').attr('disabled', 'disabled');
        }
        if(!$('[id$="enableAmendmentRequest"]').attr('checked')){
            $('[id$="amendmentRequest"]').attr('disabled', 'disabled');
        }
        if(!$('[id$="enableAmendmentResult"]').attr('checked')){
            $('[id$="amendmentResult"]').attr('disabled', 'disabled');
        }
        if(!$('[id$="enableTenderOpportunity"]').attr('checked')){
            $('[id$="tenderOpportunity"]').attr('disabled', 'disabled');                                         
        }
        if(!$('[id$="enableTenderWorkflowRequired"]').attr('checked')){
            $('[id$="tenderWorkflowRequired"]').attr('disabled', 'disabled');
        }
        if(!$('[id$="enableTenderWorkflowReference"]').attr('checked')){
            $('[id$="tenderWorkflowReference"]').attr('disabled', 'disabled');
        }       
        if(!$('[id$="enableTenderStartPrice"]').attr('checked')){ 
            $('[id$="tenderStartPrice"]').attr('disabled', 'disabled');
        }
        if(!$('[id$="enableTenderEndPrice"]').attr('checked')){ 
            $('[id$="tenderEndPrice"]').attr('disabled', 'disabled');
        }
        if(!$('[id$="enableTenderNumber"]').attr('checked')){ 
            $('[id$="tenderNumber"]').attr('disabled', 'disabled');
        }
        if(!$('[id$="enableRequiredEQServDeliveryDate"]').attr('checked')){
            $('[id$="requiredEQServDeliveryDate"]').attr('disabled', 'disabled');
        }
        if(!$('[id$="enableContractSecurityDeposit"]').attr('checked')){ 
            $('[id$="contractSecurityDeposit"]').attr('disabled', 'disabled');
        }
        if(!$('[id$="enableWarrantySecurityDeposit"]').attr('checked')){ 
            $('[id$="warrantySecurityDeposit"]').attr('disabled', 'disabled');                                                                                      
        }                                             
    });
   
    if('{!UserHasAccess}' == 'false' || '{!recordUpdated}' =='true' || '{!noChildOpp}' =='true' ){
        if('{!UserHasAccess}' == 'false'){
            $('#NoAccessNotice').html("<span class='ui-icon ui-icon-alert' style='float: left; margin: 0 15px 20px 0;'></span>{!$Label.ParentOppMassUpdateChildrenWizard_User_Without_Access}");
        }   
        else if( '{!recordUpdated}' =='true'){
            $('#NoAccessNotice').html("<span class='ui-icon ui-icon-alert' style='float: left; margin: 0 15px 20px 0;'></span>{!$Label.ParentOppMassUpdateChildrenWizardRecordUpdated}");
        }
        else if( '{!noChildOpp}' =='true' ){ 
            $('#NoAccessNotice').html("<span class='ui-icon ui-icon-alert' style='float: left; margin: 0 15px 20px 0;'></span>{!$Label.ParentOppMassUpdateChildrenWizard_ParentWithoutChild}"); 
        }
         
        $('#NoAccessNotice').bind('dialogclose', function(event) {
            window.top.location = '{!$Site.Prefix}/{!parentOppId}';
        });
        $("#NoAccessNotice").dialog( {  modal: true,
                                resizable: false,
                            buttons: {
                                    Ok: function() {
                                    $( this ).dialog( "close" );
                            }
                }} );
    }

    if('{!noFieldEnabledForUpdate}' =='true'){
        alert('{!$Label.ParentOppMassUpdateChildrenWizard_noFieldEnabledForUpdate}');
    }
    if('{!noChildTermOpp}' =='true'){
        $('#NoAccessNotice').html("<p>{!$Label.ParentOppMassUpdateChildrenWizard_ParentWithoutTenderOptyChild}</p>"); 
    }
bob_buzzardbob_buzzard
Where is this code present? Is it a Visualforce page, a sidebar component?  Also, how have you configured it as an onload handler?