ASP.NET MVC Page - Dropdown control doesn't function with Keyboard Arrow Keys

Posted by Rita on Stack Overflow See other posts from Stack Overflow or by Rita
Published on 2010-04-28T17:16:46Z Indexed on 2010/04/28 17:23 UTC
Read the original article Hit count: 297

Filed under:
|

Hi

I have a page that has a Dropdown control (ddlDeliveryMethod). So that when the user selects particular option from the Dropdown(using MOUSE), the respective Div ID's are loaded.

But instead of Mouse, if we simply use the arrow keys from Keyboard, the respective DIV ID's are not showing.

Is there any workaround for this. Appreciate your responses.

Here is my code:

// based on Delivery method, display the respective fields
        $("#ddlDeliveryMethod").change(function() {
            $('#divRegisteredMail').hide();
            $('#divRegisteredEmail').hide();
            $('#divRegisteredFax').hide();
            $('#divSaveForFuture').hide();
            switch ($("#ddlDeliveryMethod ").val()) {
                case ' -- Select one -- ':
                    break;
                case 'Email':
                    $('#divRegisteredEmail').show();
                    break;
                case 'Mail':
                    $('#divRegisteredMail').show();
                    break;
                case 'Fax':
                    $('#divRegisteredFax').show();
                    break;
                default:
                    caption = "default";
                    break;
            }
        });

© Stack Overflow or respective owner

Related posts about asp.net-mvc

Related posts about asp.net-mvc-2