Forum Moderators: coopster
<script src="../SpryAssets/SpryAccordion.js" type="text/javascript"></script>
<script type="text/javascript">
<?php echo $t1;?> ="<p><?php echo $row_teamActivity['WebCopyText'];?><\/p>"
</script>
<link href="../SpryAssets/SpryAccordion.css" rel="stylesheet" type="text/css" />
<div id="buttons">
<div id="Accordion1" class="Accordion" tabindex="0">
<div class="AccordionPanel">
<div class="AccordionPanelTab">Asia</div>
<button onclick=div1.innerHTML=<?php echo $t1;?>><?php echo $row_teamActivity['ActivitiesID'];?><?php echo $row_teamActivity['ActivitiesName'];?></button>
<div class="AccordionPanel">
</div>
</div>
<div class="AccordionPanelTab">Africa</div>
<div class="AccordionPanelContent"><button onclick=div1.innerHTML=t2><?php echo $row_teamActivity['ActivitiesID'];?><?php echo $row_teamActivity['ActivitiesName'];?></button></div>
</div>
</div>
</div>
<script type="text/javascript">
<!--
var Accordion1 = new Spry.Widget.Accordion("Accordion1");
//-->
</script>
<?php
Is it possable that the number you are getting the the resource result from the sql query? If it is then you just need to fetch the results with that resource result mysql_fetch_array [uk3.php.net]
<edit>
Check if there are any return statements giving you that number i.e. return 1; That you used to check that the function was working.
</edit>
The other thing that you need to make sure that the php variables are getting updated by your ajax. As otherwise your variables will remain the same as when they were loaded when the page was first called...This obviously defeats the point in an ajax application.
There are lots of accessibility issues with javascript navigation, so if you havent already thought about a <noscript> alternative then you may well want to ask on the accessibility forum to see what people think.
I tend to start with the static menu then add all of the client side stuff afterwards (that way I know the site works with no javascript), so you may already have all of this sorted.
[edited by: PHP_Chimp at 8:30 am (utc) on Oct. 10, 2007]
<script type="text/javascript">
07001 ="<p>Immerse yourself in the friendly Latin culture of <b>Central America</b> during your summer in <b>Honduras</b>. Take the opportunity to share the Gospel of Christ while you travel by bicycle to villages located throughout the country. Following Boot Camp training, you bus to the <b>Orlando International Airport</b> for a short flight to <b>Miami</b> and then continue over the <b>Caribbean Sea</b> and the tip of <b>Cuba</b> to San Pedro Sula, Honduras. From there you will bus two hours south, through the foothills of the Comayagua Mountains to your project site near the village of San Isidro, where the Teen Missions in Honduras base is located. During two weeks of your project time, you will continue working on a water cistern so that the national Boot Camp can have fresh rain water. The rest of your project will be spent sharing ChristÕs love as you travel by bicycle to remote villages. Puppets, singing, drama and testimonies will draw smiles from these beautiful people and give you opportunities to present the Gospel message. At the<em> Teen Missions in Honduras</em> base you stay in dorms and have showers available. Laundry will be done using your buckets. You will have an opportunity to shop in San Pedro Sula where you can purchase wood carvings, hammocks and many other unique souvenirs. Following your project time, you return to Florida for Debrief. <b>(Note: Florida Debrief)</b><\/p>"
</script>
<div id="buttons">
<div id="Accordion1" class="Accordion" tabindex="0">
<div class="AccordionPanel">
<div class="AccordionPanelTab">Asia</div>
<button onclick=div1.innerHTML=07001>07001Honduras Bike</button>
<div class="AccordionPanel">
</div>
</div>
<div class="AccordionPanelTab">Africa</div>
<div class="AccordionPanelContent"><button onclick=div1.innerHTML=t2>07001Honduras Bike</button></div>
</div>
</div>
</div>
<script type="text/javascript">
<!--
var Accordion1 = new Spry.Widget.Accordion("Accordion1");
//-->
</script>
</div></div>
<div id="div1"></div> <----- this is where the problem is it did not get data
<button onclick=div1.innerHTML=<?php echo $t1;?>><?php echo $row_teamActivity['ActivitiesID'];?><?php echo $row_teamActivity['ActivitiesName'];?></button>
<button onclick=div1.innerHTML=[b]YOUR PHP VALUE[/b]>[b]PHP activity ID + activity Name[/b]</button>