By mmilano on
What would cause the page to reload after an AHAH button submit?
The AHAH call does what it is supposed to. I see the ajax request in firebug, and I see the data return from the JS populating in my wrapper. Right after i see the wrapper populate, the page refreshes.
This is my button code, does anything stick out?
$form['myselect'] = array(
'#type' => 'submit',
'#value' => t('Select'),
'#submit' => array('mymodule_select'),
'#ahah' => array(
'path' => 'mymodule/js/select',
'wrapper' => 'mymodule-wrapper',
'method' => 'replace',
'effect' => 'fade',
),
);
sometimes it will not do it the first time, but the second time i click it it will reload
i've even dumbed down my js page callback to this for testing and i get the same results:
function mymodule_js_select() {
drupal_json(array('status' => TRUE, 'data' => theme('status_message') . 'asdf'));
}