weird response

weird response

Hello Folks,

I am jQuery newbie.

I encountered a really weird response must be my mistake somewhere.
I have been researching on internet for 2 days but not found my thing so finally decided to seek help from experts.

What I wrote is here.

  1. <script src="https://ajax.googleapis.com/ajax/libs/jquery/2.1.3/jquery.min.js"></script>
  2. <script>
  3. $(document).ready(function() {
  4. $("input[name='radioship']").change(function(){
  5. $("form").submit();

  6. });
  7. });
  8. </script>

  1. <form action="" method="post" name="frmCart" action="go.php">
  2. <input type="radio" name="radioship" id="radioship" value="1">1st Shipping Option<br />
  3. <input type="radio" name="radioship" id="radioship" value="2">2nd Shipping Option<br />
  4. input name="update" type="submit" class="button02" value="Checkout">
  5. </form>

When I change radio button this form (frmCart) should be submitted/posted but weirdly there is another form (frmRight) which is getting execute.

  1. <form name="frmRight" method="post" action="pro_search.php">
  2. <input name="pro_search" class="inputbox150" type="text" id="pro_search" size="20" maxlength="25">
  3. <input type="submit" name="Submit" value="GO"  class="button03">
  4. </form>

I tried almost every way available on tutorials but nothing is working....this is the only way atleast some form is submitting/posting......

Please help me find my mistake and thanks in advance.......