Forum Moderators: open
I have a service page that shows tabs, and when you click on the tab different layers are shown. This part works great.
However, on the home page there are teaser tabs relating to the three service tabs. Each of these has a 'read more' link to get to the service page. BUT, I can only get it to link to the default stage, with the first tab open. I thought maybe adding a target to the services page might work, but it doesn't. See code:
<li id="tab-packaging2"><a name="pack" id="pack" href="#" onClick="MM_showHideLayers('packaging2','','show','shipping2','','hide','warehousing2','','hide')">Packaging</a></li>
<li id="tab-shipping2"><a href="#" onClick="MM_showHideLayers('packaging2','','hide','shipping2','','show','warehousing2','','hide')" name="ship" id="ship">Shipping</a></li>
<li id="tab-warehousing2"><a name="house" id="house" href="#" onClick="MM_showHideLayers('packaging2','','hide','shipping2','','hide','warehousing2','','show')">Warehousing</a></li>
Is it possible to do what I want? Am I on the right track? If not, can you point me to where I can see the station? (may have taken the train analogy a bit far there. Am getting desperate)
thanks
I think you'll have to use query strings, i.e. "http://www.domain.com/page.html?tab=1".
Take a look here [activsoftware.com]
then it would be something like:
switch(getQueryVariable("tab")){
case '1': showTab(1); break;
case '2': showTab(2); break;
default: showTab(1); break;
}
Andrew