How could I make a QT Tab Ajax-reload, like it does the first time it is clicked if Ajax is enabled, every time it is clicked after being disabled?

The reason I want to do this, it b/c I have a GMap in a tab, and a form in another tab that adds a map location, but the Gmap is not refreshed (even when using Ajax "refresh views").

GMap now works with Ajax, due to the patches here : http://drupal.org/node/315236

Thanks

Comments

kvvnn’s picture

Status: Active » Closed (fixed)

KateBailey said

kvnn: remove the quicktabs_tabpage class
kvnn: in your own jquery code

This worked perfectly.

But it didn't load the Gmap. Gmap has serious Ajax issues, so, to be expected I guess.

Cheers.

Anonymous’s picture

This works fine for reloading the page but when I post a comment within a quicktab it gives me the following:

{ "status": true, "data": "\x3cdiv id=\"block-block-4\" class=\"block block-block odd region-count-1 clearfix\"\x3e\n\n  \x3cdiv class=\"content\"\x3e\n    \x3cdiv class=\"item-list\"\x3e\x3cul class=\"activity-list\"\x3e\x3cli class=\"first last\"\x3e\x3cspan class=\"activity activity-module-nodeactivity activity-type-note activity-operation-insert\"\x3e\x3cdiv class=\"author\"\x3e\x3cdiv class=\"picture\"\x3e\n  \x3ca href=\"/dev/users/6\" title=\"View user profile.\"\x3e\x3cimg src=\"http://192.168.1.4:9003/dev/system/files/imagecache/avatar_s/avatars/picture-6.jpg\" alt=\"Hublot\x26#039;s picture\" title=\"Hublot\x26#039;s picture\"  class=\"imagecache imagecache-avatar_s\" width=\"50\" height=\"50\" /\x3e\x3c/a\x3e\x3c/div\x3e\n\x3c/div\x3e\x3cdiv class=\"activity-message\"\x3e\x3ca href=\"/dev/users/6\" title=\"View user profile.\"\x3eHublot\x3c/a\x3e \x3ca href=\"/dev/note/welcome-hublotista-club\"\x3eWelcome on the Hublotista Club\x3c/a\x3e\x3cdiv class=\"overview\"\x3e\x3cdiv class=\"img\"\x3e\x3ca href=\"/dev/note/welcome-hublotista-club\"\x3e\x3cimg src=\"http://192.168.1.4:9003/dev/system/files/imagecache/activity_thumb/biver.jpg\" alt=\"\" title=\"\"  class=\"imagecache imagecache-activity_thumb\" width=\"100\" height=\"70\" /\x3e\x3c/a\x3e\x3c/div\x3e\x3cspan\x3e\x3cP\x3eDear Hublotistas,\x3c/P\x3e\r\n\x3cP\x3eThrough your purchase of a Hublot watch you demonstrate your willingness to be connected with the tradition and the future.\x3cBR\x3eA connection that we have defined as \"the Art of Fusion\". It is our message and our reason to exist.\x3c/P\x3e\r\n\x3cP\x3eNever repeat the past, but use it to project it into the future and thus explore a new universe.\x3cBR\x3eYour purchase proves us that you share our vision and we congratulate you for joining the Hublot world.\x3c/P\x3e\r\n\x3cP\x3eBe welcome, we hope to meet with you in our very closed circle and I wish you happiness, success and luck with the Hublot watch at your wrist.\x3c/P\x3e\x3c/span\x3e\x3c/div\x3e\x3c/div\x3e\x3c/span\x3e\x3cdiv class=\"activity-information\"\x3e\x3cdiv class=\"time-ago\"\x3e18 weeks 17 hours ago - \x3c/div\x3e\x3cdiv class=\"activity-comments-click-to-show_hide\"\x3e\x3cdiv class=\"activity-comment-action\"\x3eComment\x3c/div\x3e\x3c/div\x3e\x3cdiv class=\"item-list\"\x3e\x3cul class=\"activity-comments-list\"\x3e\x3cli class=\"first\"\x3e\x3cdiv class=\"activity-comment\"\x3e\x3cdiv class=\"activity-comment-from\"\x3e\x3cdiv class=\"activity-comment-author-picture\"\x3e\x3ca href=\"/dev/users/cyril-bays\" title=\"View user profile.\"\x3e\x3cimg src=\"http://192.168.1.4:9003/dev/system/files/imagecache/avatar_s/avatars/picture-11.jpg\" alt=\"View user profile.\" title=\"View user profile.\"  class=\"avatar\" width=\"50\" height=\"50\" /\x3e\x3c/a\x3e\x3c/div\x3e\x3cspan class=\"activity-comment-author\"\x3e\x3ca href=\"/dev/users/cyril-bays\" title=\"View user profile.\"\x3eCyril Bays\x3c/a\x3e\x3c/span\x3e \x3cspan class=\"activity-comment-timestamp\"\x3eat 11/22/2009 - 23:08\x3c/span\x3e \x3ca href=\"/dev/activity/comment/delete/8?destination=quicktabs%2Fajax%2Fblock%2Fblock_delta_4%2F1\" title=\"Delete this activity record comment\" class=\"activity-delete-comment\"\x3eX\x3c/a\x3e\x3c/div\x3e\x3cdiv class=\"activity-comment-comment\"\x3eGreat idea, ready to share with Hublotistas\x3c/div\x3e\x3c/div\x3e\x3c/li\x3e\n\x3cli class=\"last\"\x3e\x3cdiv class=\"activity-comment\"\x3e\x3cdiv class=\"activity-comment-from\"\x3e\x3cdiv class=\"activity-comment-author-picture\"\x3e\x3ca href=\"/dev/users/1\" title=\"View user profile.\"\x3e\x3cimg src=\"http://192.168.1.4:9003/dev/system/files/imagecache/avatar_s/sites/all/themes/hublotvip09/images/avatar_1.jpg\" alt=\"View user profile.\" title=\"View user profile.\"  class=\"avatar\" width=\"50\" height=\"50\" /\x3e\x3c/a\x3e\x3c/div\x3e\x3cspan class=\"activity-comment-author\"\x3e\x3ca href=\"/dev/users/1\" title=\"View user profile.\"\x3eIvitech SA\x3c/a\x3e\x3c/span\x3e \x3cspan class=\"activity-comment-timestamp\"\x3eat 03/26/2010 - 18:02\x3c/span\x3e \x3ca href=\"/dev/activity/comment/delete/11?destination=quicktabs%2Fajax%2Fblock%2Fblock_delta_4%2F1\" title=\"Delete this activity record comment\" class=\"activity-delete-comment\"\x3eX\x3c/a\x3e\x3c/div\x3e\x3cdiv class=\"activity-comment-comment\"\x3eI\x26#039;m really looking forward to the launch.\x3c/div\x3e\x3c/div\x3e\x3c/li\x3e\n\x3c/ul\x3e\x3c/div\x3e\x3cdiv class=\"activity-comment-form\"\x3e\x3cdiv class=\"current-user-pic\"\x3e\x3ca href=\"/dev/users/1\" title=\"View user profile.\"\x3e\x3cimg src=\"http://192.168.1.4:9003/dev/system/files/imagecache/avatar_s/sites/all/themes/hublotvip09/images/avatar_1.jpg\" alt=\"View user profile.\" title=\"View user profile.\"  class=\"avatar\" width=\"50\" height=\"50\" /\x3e\x3c/a\x3e\x3c/div\x3e\x3cform action=\"/dev/quicktabs/ajax/block/block_delta_4/1\"  accept-charset=\"UTF-8\" method=\"post\" id=\"activity-comment-form\"\x3e\n\x3cdiv\x3e\x3cinput type=\"hidden\" name=\"aid\" id=\"edit-aid\" value=\"9\"  /\x3e\n\x3cdiv class=\"form-item\" id=\"edit-activity-comment-wrapper\"\x3e\n \x3ctextarea cols=\"60\" rows=\"1\" name=\"activity-comment\" id=\"edit-activity-comment\"  class=\"form-textarea resizable\"\x3e\x3c/textarea\x3e\n\x3c/div\x3e\n\x3cinput type=\"submit\" name=\"op\" id=\"edit-submit\" value=\"Comment\"  class=\"form-submit\" /\x3e\n\x3cinput type=\"hidden\" name=\"form_build_id\" id=\"form-6992ad327859e619213f8f3efe34f642\" value=\"form-6992ad327859e619213f8f3efe34f642\"  /\x3e\n\x3cinput type=\"hidden\" name=\"form_token\" id=\"edit-activity-comment-form-form-token\" value=\"1a41504df9aa367b919903ef73250693\"  /\x3e\n\x3cinput type=\"hidden\" name=\"form_id\" id=\"edit-activity-comment-form\" value=\"activity_comment_form\"  /\x3e\n\n\x3c/div\x3e\x3c/form\x3e\n\x3c/div\x3e\x3cdiv class=\"clear\"\x3e\x3c/div\x3e\x3ca href=\"/dev/activity/delete/9?destination=quicktabs%2Fajax%2Fblock%2Fblock_delta_4%2F1\" title=\"Delete this activity record\" class=\"activity-delete-record\"\x3eX\x3c/a\x3e\x3cdiv class=\"clear\"\x3e\x3c/div\x3e\x3c/li\x3e\n\x3c/ul\x3e\x3c/div\x3e\x3cdiv class=\"paging\"\x3e \x3c/div\x3e  \x3c/div\x3e\x3c!-- CLASS content --\x3e\n\x3c/div\x3e\x3c!-- ID block-block-4 CLASS block block-block odd region-count-1 --\x3e\n" }

can anyone help by explaining why this happens and maybe a hint towards how I can fix this?

kvvnn’s picture

That only happens when you remove the quicktabs_tabpage class from your tabs?

2faroffroad’s picture

Where / How do you remove this quicktabs_tabpage class.
Thanks.

kvvnn’s picture

2faroffroad :

kvnn: remove the quicktabs_tabpage class
kvnn: in your own jquery code

So, in a javascript file to something like:

$('.quicktabs_tabpage').removeClass('quicktabs_tabpage');
OxH2’s picture

I have setup a js file including the line of code in #5:

$('.quicktabs_tabpage').removeClass('quicktabs_tabpage');

I'm including this file in my theme - should I only be including this file in the source pages that are being displayed in the quicktabs?