This is a migrated thread and some comments may be shown as answers.

show/hide controls on advanced edit form

3 Answers 109 Views
Scheduler
This is a migrated thread and some comments may be shown as answers.
Alex
Top achievements
Rank 1
Alex asked on 23 May 2011, 07:39 PM
hello all,
I have a customized advanced edit form that displays a number of resources in drop down lists. I need to enable/disable these drop down lists based on user selections. Ive attempted to do this with jQuery but for whatever reason, when the change event is fired, it does not disable the drop downs.
here is the code:

<script type="text/javascript">
    (function ($) {
        $(function () {
            $('.rsAdvChkWrap').hide();
            $("[id$='_ResActivity_ResourceValue_Input']").bind('change', function () {
 
                if ($("[id$='_ResActivity_ResourceValue_Input']").val() !== 'ILT - Instructor Led Training') {
                    //alert('not equal');
                    $("[id$='_ResCourse_ResourceValue_Input']").attr('disabled', 'disabled');
                    $("[id$='_ResLocation_ResourceValue_Input']").attr('disabled', 'disabled');
 
                } else {
                    //alert('equal');
                    $("[id$='_ResCourse_ResourceValue_Input']").removeAttr('disabled');
                    $("[id$='_ResLocation_ResourceValue_Input']").removeAttr('disabled');
                }
            });
        });
    })($telerik.$);
</script>


I know that the event is firing because when I uncomment the alert() functions, I get the alert.
 Any thoughts/recommendations are appreciated.

Thanks
Alex

3 Answers, 1 is accepted

Sort by
0
Plamen
Telerik team
answered on 26 May 2011, 01:46 PM
Hi Alex,

Could you please send us your advanced form template so we can test it.

Greetings,
Plamen Zdravkov
the Telerik team

Browse the vast support resources we have to jump start your development with RadControls for ASP.NET AJAX. See how to integrate our AJAX controls seamlessly in SharePoint 2007/2010 visiting our common SharePoint portal.

0
Bhupinder
Top achievements
Rank 1
answered on 04 Jan 2012, 11:28 AM
Hi,

Is there a solution to this? I am also facing the same issue. I want to show/hide the controls on Advanced Form via JavaScript with help of dropdown

Thanks
Bhupinder
0
Plamen
Telerik team
answered on 04 Jan 2012, 05:53 PM
Hi Bhupinder,

 
Have you considered the following help topic where it's described how to achieve similar functionality with javascript or jquery.

Hope this will be helpful.

Kind regards,e
Plamen Zdravkov
the Telerik team
If you want to get updates on new releases, tips and tricks and sneak peeks at our product labs directly from the developers working on the RadControls for ASP.NET AJAX, subscribe to their blog feed now
Tags
Scheduler
Asked by
Alex
Top achievements
Rank 1
Answers by
Plamen
Telerik team
Bhupinder
Top achievements
Rank 1
Share this question
or