Auto Form Submit Problem

Auto Form Submit Problem

Hi guys,

I have a rather confusing problem.

To demonstrate I have setup 2 separate webpages : here and this one here

The form at top of both pages are filtering all the venues on the site by the postal code W1F 7HU.

The first form, on test/W1F 7HU, is being submitted automatically by my javascript code which is as follows:

  1. $(document).ready(
  2.     function(){
  3.         $path        =    window.location.pathname;
  4.         $pathParts    =    $path.split('/');
  5.         $postalCode    =    $pathParts[2].replace(' ', ' ');
  6.        
  7.         $('#edit-postal-code').val( $postalCode );
  8.        
  9.         $('body.section-test #edit-submit-ListVenues').click();
  10.        
  11.     }
  12. );

The second form on test2/W1F 7HU waits to be submitted by clicking on the apply button.
You will notice the effects are completely different. What I don't know is why.

Can anyone please help me out here ......... thanks.