0

I am new in MVC. I am working on a view where I add two radio buttons.

<label for="lDIV1">
    <input id="lDIV1" type="radio" name='rbtab' value='DIV1' onclick="javascript:custom()" />Create
    Email:</label>
<label for="lDIV2">
    <input id="lDIV2" type="radio" name='rbtab' checked="checked"  value='DIV2' onclick="javascript:defaul()" />Default
    Email:</label>
<div id='Content' style="display: block">

Now I want to call a function in Action {Http} that is if first radio button is true then call radiobutton1() method or else call radiobutton2() method Can you guys Help me out how to apply conditions..

tereško
  • 58,060
  • 25
  • 98
  • 150
ZCoder
  • 2,155
  • 5
  • 25
  • 62

1 Answers1

1

im not sure what you want to do because your question is not that clear but here is how you can do something when a checkbox is checked with jquery

http://jsfiddle.net/HQXLm/1/

<input id="checkme" type="checkbox" /> click me to find out if im checked

$('#checkme').click(function(){
    if ($(this).is(':checked')){
         alert('I am checked, do something here');   
    }
});
Dejan.S
  • 18,571
  • 22
  • 69
  • 112