I'm trying to make an imagemap's .click() event trigger two things:
a) the selection of an item in an Exposed Filter of a view
b) the subsequent submission of the AJAX to refresh the view based on the new filter
I have a view set up with AJAX enabled. My jQuery looks like this:
jQuery('#northside').click(
function () {
jQuery('#edit-tid').val("1");
jQuery('views-exposed-form-frontpageplaces-block').ajaxSubmit();
}
);
I'm sure that .ajaxSubmit() isn't the correct syntax here, but I was trying to use Malsup's JQuery Form plugin.
It seems that this guy has a similar problem.
Am I doing something completely off-base here? How do I fix it?
Comments
Comment #1
warrenmcquinn commentedComment #2
warrenmcquinn commentedComment #3
j0rd2 commentedI'm changing a input value to do some spam protection with javascript before submissions.
It works fine in non-ctools-modal form, but then doesn't have in ctools-ajax-modal-form submission.
Additionally in chrome inspector, I can see the value change, but in hook_validate hook_submit, the value is not changed. I have a feeling there's some order of operations problem.
So...
bump.
Comment #4
j0rd2 commentedPerhaps this?
Drupal.ajax[base].form = $this;
and then later trigger('submit') happens (which is where I modify my form values. But since the Drupal.ajax[base].form is already set, it won't get changed and that's what gets submitted?
Comment #5
mustanggb commented