Hi,
This is a bit complex, so I'll try to explain the issue as best as I can...
I'm using the quicktabs module to load a node via ajax. This node has a webform on it with the ajax module enabled for webforms. On the node page everything is fine and the ajax validation takes place. However, when that same node is loaded via ajax using quicktabs, the ajax module no longer works and the form is submitted to the node rather than in-place.
I think this can be solved by using livequery (http://plugins.jquery.com/project/livequery) but I can't work out what I need to modify in ajax.js so that it uses livequery.
Usually if you have:
$('table.sticky-enabled').hide();
you use livequery by wrapping the code above like so:
$('table.sticky-enabled').livequery(function(){
$(this).hide();
});But I can't see what selectors I need to wrap in ajax.js. Can anyone point me in the right direction?
thanks
Comments
Comment #1
brendoncrawford commentedsameer,
Thanks for your feedback. I will have a look this weekend.
Comment #2
sameer commentedthanks brendon. Let me know if you need more info...
Comment #3
brendoncrawford commentedSameer,
Here is a solution to your issue. This same solution is being used for the thickbox module....
After a quicktabs ajax response occurs, simply call this function in JavaScript:
Where SOME_DOM_NODE is any DOM element which is an ancestor of the form being submitted.
I will mark this bug as fixed. If you still have any problems or questions, please re-open it.
Thanks,
Brendon
Comment #4
brendoncrawford commentedComment #5
brendoncrawford commentedsameer,
Because I am such a nice guy (just kidding), I have added a built-in quicktabs plugin for the Ajax module. It has been added to the 6.x-1.x-dev release. Please allow up to 12 hours for the package to update. Just enable the module, and Ajax.module should work fine with it.
Comment #6
sameer commentedHi brendon,
you are too kind. Thanks for the code and for the modification to your module. Your solution seems to be working very well.
Congratulations on an excellent module! And thanks for your help!