PDA

View Full Version : ajaxtabs n00bie help needed



decadude
10-24-2011, 12:42 AM
1) Script Title: ajaxtabs

2) Script URL (on DD): http://www.dynamicdrive.com/dynamicindex17/ajaxtabscontent/ajaxtabs_suppliment3.htm

3) Describe problem: honestly i dont know other than it doesnt seem to be working see url below

http://www.mtgotopdeck.com/index.php

i have uploaded the one folder that is ajaxtabs to root and in my code did this


<script src="ajaxtabs/ajaxtabs.js" type="text/javascript">// <![CDATA[
/***********************************************
* Ajax Tabs Content script v2.2- Dynamic Drive DHTML code library (www.dynamicdrive.com)
* This notice MUST stay intact for legal use
* Visit Dynamic Drive at http://www.dynamicdrive.com/ for full source code
***********************************************/
// ]]></script>
<ul id="countrytabs" class="shadetabs">
<li><a class="selected" rel="#default" href="#">Tab 1</a></li>
<li><a rel="countrycontainer" href="external2.htm">Tab 2</a></li>
<li><a rel="countrycontainer" href="external3.htm">Tab 3</a></li>
<li><a rel="#iframe" href="external4.htm">Tab 4</a></li>
<li><a href="http://www.dynamicdrive.com">Dynamic Drive</a></li>
</ul>
<div id="countrydivcontainer" style="border: 1px solid gray; width: 450px; margin-bottom: 1em; padding: 10px;">//Optional default content here.</div>
<script type="text/javascript">// <![CDATA[
var countries=new ddajaxtabs("countrytabs", "countrydivcontainer")
countries.setpersist(true)
countries.setselectedClassTarget("link") //"link" or "linkparent"
countries.init()
// ]]></script>

jscheuer1
10-24-2011, 01:31 AM
In your post you've linked to the supplement page for this script, not to the main page:

http://www.dynamicdrive.com/dynamicindex17/ajaxtabscontent/index.htm

Perhaps if you were to review the information there and download the demo archive offered there and use it as a template, you would better understand how to use the script.



That said, currently with your page, the external files aren't on the server. Like:

mtgotopdeck.com/external2.htm

is 404 Not Found.

There could also be other problems. But this much has to be fixed for it to even have a chance of working.

To see the tab layout as expected, you need the:


<link rel="stylesheet" type="text/css" href="ajaxtabs.css" />

tag in the head and to upload the ajaxtabs.css and other support file to the server.

As I say though, look over the main demo page for the script. I think it may clear up a lot of your questions.