0

I work with MVC 3. In a view I have 2 radio buttons. When I click on one of the two radiobuttons then I try with jquery to load a view. But it doesn's work.

I am completley new to MVC and jQuery.

Here is my code:

  $('radioButtonFor#dutch').click(function () {
      load('/MyController/MyView', parameterForTheView)
  });

And here is one of the radio buttons:

             @Html.RadioButtonFor(m => m.IsBelg, false, new { id = "dutch" })

Please help me!

Ronald

1
  • Could you post the code of your MyView controller action, and also the details of any firebug console errors you are getting Commented May 17, 2011 at 15:15

2 Answers 2

3

Your jquery reference to the Radio Button should read as follows:

  $("#dutch").click(function () {
      load('/MyController/MyView', parameterForTheView)   
  });
Sign up to request clarification or add additional context in comments.

Comments

0

is load method your own method? jquery should look like

$("#container").load(...);

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.