title: get page radio button value to same page form action
body: <p>I have a form with a series of radio button. The form is like</p>
  
  <pre><code>&lt;form method="POST" action="&lt;?php echo JRoute::_('index.php?Itemid='.JRequest::getInt('Itemid',0).&amp;bannertype='.$_POST['bannerselect'])?&gt;" name="ftForm"&gt;
  </code></pre>
  
  <p>In the form itself there the radio buttons is as below</p>
  
  <pre><code>&lt;table cellpadding="0" cellspacing="0" style="width: 100%; margin-left: 34px;"&gt;
              &lt;tr height="40px"&gt;
                  &lt;td&gt;
                      &lt;input name="bannerselect" id="bannerselect1" type="radio" value="1" /&gt;
                 &lt;/td&gt;
                  &lt;td&gt;
                      &lt;img alt="" src="http://www.abc.com/img/1.png" /&gt;
                 &lt;/td&gt;
                  &lt;td&gt;
                          &lt;input name="bannerselect" id="bannerselect2" type="radio" value="2" /&gt;
                 &lt;/td&gt;
                  &lt;td&gt;
                      &lt;img alt="" src="http://www.abc.com/img/2.png" /&gt;
                 &lt;/td&gt;
                  &lt;td&gt;
                          &lt;input name="bannerselect" id="bannerselect3" type="radio" value="3" /&gt;
                 &lt;/td&gt;
                  &lt;td&gt;
                      &lt;img alt="" src="http://www.abc.com/img/3.png" /&gt;
                 &lt;/td&gt;                
             &lt;/tr&gt;
  &lt;/table&gt;
  </code></pre>
  
  <p>I have this javascript that validates the radio button selection.</p>
  
  <pre><code>function checkbannerselect(){
          var bannerv = document.getElementsByName("bannerselect");
          var check1 = 0;
          var bvalue = "";
          for(i=0;i&lt;bannerv.length;i++){
              if(bannerv[i].checked){
                check1++;
                bvalue = bannerv[i].value;
              }
           }          
          if(check1){
          document.ftForm.submit();
          }else{
          alert('You have not select a banner, please select a Banner Type');
          return false;
          }
      }
  </code></pre>
  
  <p>How can i get the value of the radio button and attached it to the from action. </p>
  
  <p>I tried using $_POST['bannerselect'] which is obviously not correct.How can i get the value of my radio button and use it in the form action?</p>