1) Script Title: Ajaxtabs
2) Script URL (on DD): http://www.dynamicdrive.com/dynamici...axtabscontent/
3) Describe problem:
I was trying to hide a div outside of the tabs with an onClick() event in the tab's link, but could not. Later, after some tinkering, i discovered that not even an in-line javascript alert would work with the onClick method. I'm fairly new to ajax implementation. The tabs are loaded as a search mechanism (included via php) site-wide, and on a particular page, i want to hide one of the divs on the page when one of the tabs are selected in particular. Is there no way to accomplish this?
the initialization:
and the other portion of the ajaxtabs:Code:<script type="text/javascript"> var searches=new ddajaxtabs("searchtabs", "searchcontainer") searches.setpersist(true) searches.setselectedClassTarget("link") //"link" or "linkparent" searches.init() </script>
...Code:<ul id="searchtabs" class="shadetabs" style="text-align:left; width:700px; margin: 0px auto"> <li><a href="<?=$site_url ?>example.php" rel="searchcontainer" class="selected">example</a></li> <li><a href="<?=$site_url ?>example2.php" rel="searchcontainer" id="nppa" onClick="document.getElementById('hide_this').style.display='none';">example 2</a></li> </ul> <div id="searchcontainer" style="border:1px solid gray; width:700px; margin: 0px auto; padding: 10px; background:#1003cb url(/i/searchbox.png) no-repeat; text-align:center; -moz-border-radius: 15px; border-radius: 15px"> </div>
elsewhere on the page:
Any way to make this work, or an alternative that may work for this?Code:<div id="hide_this"> some content </div>
Thanks for any help.



Reply With Quote

Bookmarks