forum

Home / DeveloperSection / Forums / Radio Button Redirect

Radio Button Redirect

mathieu cupryk253131-Mar-2014

How can I fix the above so that :

if the user selects jobseeker redirect them to
JobSeeker/jsRegistration.cshtml otherwise go to
Employer/empRegistration.cshtml

 

<div class="wrap">
   <div class="content">
        @Html.AntiForgeryToken()
       <div class="botitle_h1">Are you a Job Seeker or an Employer?</div>
       <form action="~/Registration/Registration" method="post">
           <div class="inner-content" style="border:none">
               <span><input type="radio" onclick="selecttype('jobseeker');" name="account" id="jobseeker" value="0"> I am a Job Seeker seeking WORK </span>
               <span> <input type="radio" onclick="selecttype('employee');" name="account" id="employee" value="1"> I am a Company seeking to HIRE </span>
               <input id="regtype" type="hidden" name="regtype" value="0" />
               <span style="float:right">
                   <input type="submit" class="home_buttonNext" value="Next Step">
               </span>
               <span style="clear:both"></span>
           </div>
       </form>
   </div>
</div>
<script>
   function selecttype(type) {
       if (type == 'jobseeker') {
            $('#regtype').val('0');
       }
       else {
            $('#regtype').val('1');
       }
   }
</script>


Updated on 03-Apr-2014

Can you answer this question?


Answer

7 Answers

Liked By