0

I'm new to Rails and I know a bit of Jquery. I need a checkbox that when clicked sends parameter to controller (using Jquery). How can I do this? Can anyone explain me using examples? Thank you all

2
  • What type of parameter do you want to send? Also, would you want to perform a request as AJAX, or to load a new page? Commented Mar 20, 2012 at 18:47
  • Try asking about real things. You would get a lot better answers this way. Commented Mar 20, 2012 at 18:51

1 Answer 1

1

With this general question, The best I can give you is this:

function foo{
    $.ajax({
        url: "test.HTML",
        type: "POST",
        data: this.value,
        success: function (){...},
    });    
}

$('input[name="foo"]').change(foo);
Sign up to request clarification or add additional context in comments.

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.