Jump to content
  • Checkout
  • Login
  • Get in touch

osCommerce

The e-commerce.

manufacturer dropdown box - submit on change


Guest

Recommended Posts

i'm trying to put a manufacturer dropdown box in the header under my quick search input form.

 

screenshot1.gif

 

screenshot2.gif

 

i have it working but only if i add a submit button.

 

i want it to be a submit on select form but can't figure out what to add where.

 

this is what i have (which works with submit button):

<?php echo tep_draw_form('manufacturers', tep_href_link(FILENAME_DEFAULT, '', 'NONSSL', false), 'get') . tep_draw_pull_down_menu('manufacturers_id', tep_get_manufacturers(array(array('id' => '', 'text' => TEXT_ALL_MANUFACTURERS)))); ?></form>

 

i'm working off the code in catalog/includes/boxes/manufacturers.php (below). i've tried adding 'onChange="this.form.submit();"' inside the ))) of my code above, but no luck.

 

##################################################

catalog/includes/boxes/manufacturers.php code to draw dropdown box and submit on change

##################################################

$info_box_contents = array();

$info_box_contents[] = array('form' => tep_draw_form('manufacturers', tep_href_link(FILENAME_DEFAULT, '', 'NONSSL', false), 'get'),

'text' => tep_draw_pull_down_menu('manufacturers_id', $manufacturers_array, (isset($HTTP_GET_VARS['manufacturers_id']) ? $HTTP_GET_VARS['manufacturers_id'] : ''), 'onChange="this.form.submit();" size="' . MAX_MANUFACTURERS_LIST . '" style="width: 100%"') . tep_hide_session_id());

}

 

##################################################

Link to comment
Share on other sites

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...