Where to paste

In Drupal 6, you can paste any theme-related javascript code in a file named script.js in your theme's directory, this usually means /sites/all/themes/yourthemename/script.js

But note that you will need to put this code inside a "behavior" to ensure it gives the desired results, here is a behavior that only does this form submission thing :

Drupal.behaviors.mySpecialBehavior = function(context) {
  $('.views-widget .selects select').change(function() {
    $(this.parentNode.parentNode.parentNode).bind('change-hierarchical-select',function() {
      $(".view-filters form",context).submit();

So, you just paste the above code in your script.js file and this get the job done.


The content of this field is kept private and will not be shown publicly.
  • Web page addresses and e-mail addresses turn into links automatically.
  • Allowed HTML tags: <a> <em> <strong> <cite> <code> <ul> <ol> <li> <dl> <dt> <dd>
  • Lines and paragraphs break automatically.

More information about formatting options

Type the characters you see in this picture. (verify using audio)
Type the characters you see in the picture above; if you can't read them, submit the form and a new image will be generated. Not case sensitive.