0

I have an ASP .NET MVC 3 application and I am using Jquery to enhance user experience. I have a page where there is a state and county dropdown and the county dropdown is loaded based on state selected (using JQuery). Now I have certain users who have disabled JS and it is not loading.

Can anyone suggest a way to accomplish this (I am ready to redesign my page too if required).

Thanks in Advance.

2
  • 1
    I don't think this is possible since even a change event would have to trigger backend code, which would be achieved with JS... Who/why would anyone have JS disabled!? Commented Jul 30, 2012 at 15:21
  • people concerned about security disable JS Commented Jul 30, 2012 at 15:32

2 Answers 2

3

jQuery /any javascript in your page won't work if javscript is disabled in the browser. As javascript plays a major role in improving the user experience in today's web applications, I would definitly add a Message to the user if javascript is disabled.

<noscript>
  <p>You are missing some awesome features of this site. Enable Javascript to see it</a>
</noscript>

If you really want to make it work without javascript, you may submit your form (the user should click on the submit button) after selecting the Country from the dropdown. Your POST action can read the selected country and get a list of States and set that in your Mode/ViewModel and send it back to the View again. But this is not a user friendly option !. So many button clicks and Form submits. AH !!! . I would tell the user to enable javascript.

Sign up to request clarification or add additional context in comments.

1 Comment

Thanks for the info Shyju. I already have the <noscript> but the user does not want to enable JS. I think my only way now is to make them hit a submit and get the counties based on the selected state. I know it is not user friendly but that is what they want.
1

One potential option is to have a "JavaScript-disabled" view that allows the user to select the state, then click a submit button (where the county will be on the next view), and have the form sent to a controller that takes the state from the form, determines the counties to display, and returns a view with the possible counties (disabling the state selection on that view).

How you determine which view (the JavaScript-enhanced or JavaScript-disabled) is up to you.

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.