title: redirect to another page after selecting radiobutton in mvc3
body: <p>I have search box and add and edit buttons in one page.i have to edit a detail after selecting radiobutton.The script for selecting radiobutton and redirecting to next page is given below.But only alert to 'Select resume' only works.rest of code is not working.Pls help</p>
  
  <pre><code>&lt;script type="text/javascript"&gt;
           $(document).ready(function () {
           var which_button;
           var rad;
           $('input[type="image"]').click(function (event) {
           process_form_submission(event);             
           if (which_button == "Edit") {
               if (!$("input[name='rdoUserId']:checked").val()) {
                   alert('Select a Resume!');
                   return false;
               }
               else {
                   rad = $("input[name='rdoUserId']:checked").val();
                   var url = "Edit/" + rad;
  
                   $('#frmIndexResume').attr("action", url);
                   $('#frmIndexResume').submit();
               }
           }            
           return false;
       })
       function process_form_submission(event) {
           event.preventDefault();
           //var target = $(event.target);  
           var input = $(event.currentTarget);
           which_button = event.currentTarget.value;
       }
   }); 
  &lt;/script&gt;
  &lt;form name="frmIndexResume" method="get"action=""&gt;
  &lt;table id="tblSearch"&gt;
  &lt;tr&gt;
  &lt;td&gt;Name:@Html.TextBox("Names")&lt;/td&gt;
  &lt;td&gt;From:@Html.TextBox("FromDate")&lt;/td&gt;
  &lt;td&gt;To:@Html.TextBox("ToDate")&lt;/td&gt;
  &lt;td&gt;&lt;input type="image" value="Search" src="@Url.Content("~/images/Search.png")"   width="60px"height="40px" alt="Search"/&gt;&lt;/td&gt;
  &lt;/tr&gt;
  &lt;/table&gt;
  
  &lt;table id="Createbtn"&gt;
    &lt;tr&gt;
  &lt;td&gt;
    &lt;a href="@Url.Action("Create", "Resume")" title="Create"&gt;
      &lt;img src="@Url.Content("~/images/Create.png")" width="40px" height="30px"alt="Create"/&gt;&lt;/a&gt;
  &lt;/td&gt;
  &lt;td&gt;
      &lt;input type="image" value="Edit" src="@Url.Content("~/images/Edit.png")" width="40px" height="30px" alt="Edit"/&gt;       
      &lt;/td&gt;
    &lt;/tr&gt;
  &lt;/table&gt;
  
  &lt;table id="tblResume"&gt;
  &lt;caption&gt;Listings&lt;/caption&gt;
  &lt;tr&gt;
      &lt;th&gt;Select&lt;/th&gt;
      &lt;th&gt;
          Name
      &lt;/th&gt;        
      &lt;th&gt;
          DOB
      &lt;/th&gt;
  &lt;/tr&gt;
  
  @foreach (var item in Model)
  {
  &lt;tr&gt;
       &lt;td&gt;
       &lt;input type="radio" value="@item.Id" name="rdoUserId" /&gt;       
      &lt;/td&gt;  
      &lt;td&gt;
          @Html.DisplayFor(modelItem =&gt; item.Name)
      &lt;/td&gt;        
      &lt;td&gt;
          @Html.DisplayFor(modelItem =&gt; item.DOB)
      &lt;/td&gt;
  
     &lt;/tr&gt;
  }
  
  &lt;/table&gt;
  &lt;/form&gt;
  </code></pre>