Closed (fixed)
Project:
Magic Tabs
Version:
5.x-1.x-dev
Component:
Code
Priority:
Normal
Category:
Support request
Assigned:
Unassigned
Reporter:
Created:
17 Nov 2008 at 01:47 UTC
Updated:
9 Jun 2013 at 15:11 UTC
Just to start off, I have been having fun with this module, but it is difficult to find answers since it's different than the jstools tabs. The main reason I chose it was due to the ajax loading function.
I can get a custom google map api working in the tab, but if I change tabs and go back it is no longer visible. Can some one provide a solution to this. I see solutions for jstools tabs, but can't get one to work in magic tabs.
Thank you
Comments
Comment #1
yhager commentedCan you provide the code you used for your callback?
Comment #2
pwieck commentedThe top of my module
The rest of the module is straight from the example and
<?php print magic_tabs_get('lake_layout_magic_tabs'); ?>is what I pasted in the contemplate area. Then in the page.tpl I pasted my google api javascript. Initialized the google function with body onload. Then in my custom module I just put$test2 .= '<div id="map_canvas" style="width: 500px; height: 300px"></div>';and then 'content' => $test2,.I know this is super cude, but it is the best I know how to do for now. I'm learning everyday. I know just enough to be dangerous:)'
Thank you.
Comment #3
webrascal commentedI'm doing a bit of hunting around trying to find which tabs module I should implement on my next project and having stumbled on this hopefully I could help you out here a bit.
What you may be experiencing is some race condition conflicts with your body onload call and the way jquery expects things to happen and in which order.
If I were you I'd look into getting your google map javascript executed through the jquery instead of the body onload call.
Have a read through here (http://docs.jquery.com/Tutorials:Getting_Started_with_jQuery) to see if you can get your head into it a bit more, specifically this area:
This may or may not fix your problem, but it could at least rule out race conditions being a problem.
Good luck!
Comment #4
pwieck commentedUnsupported version of drupal