FIXED; это был случай добавления еще одного включения в файл fancount.php!
Исходный код:
<div class="l-title">
<div class="t-left"></div>
<div class="t-mid">Popularity Update</div>
<div class="t-right"></div></div>
<?php makechoice($cat_array); ?>
Код функции:
function makechoice($cat_array) {
global $djnames;
global $djids;
global $djurl;
$dbz = new db();
$sim = new simple();
echo '<div class="choose-section">';
echo '<select class="selbox" onchange="categoryAjaxData(\'facebook\',\'/includes/fancount.php\',this.value);">';
foreach($cat_array as $cat) {
echo('<option value="'.$cat[0].'">'.$cat[1].'</option>');
}
echo '</select>';
echo 'Choose a section';
echo '</div>';
echo '<div id="facebook"><div class="facebook-midcut">',showfans($djnames, $djids, $djurl),'</div><div class="l-botcut"></div></div>';
}
Код от fancount.php
<?php
include_once("../_inc/global.php");
include_once("../_inc/dbmysql.php");
include_once("../_inc/simple.php");
$dbz = new db();
$sim = new simple();
switch ($_GET['catid']) {
case 1:
echo '<div id="facebook"><div class="facebook-midcut">',showfans($barnames, $barids, $barurl),'</div><div class="l-botcut"></div></div>';
break;
case 2:
echo '<div id="facebook"><div class="facebook-midcut">',showfans($beachrestaurantnames, $beachrestaurantids, $beachrestauranturl),'</div><div class="l-botcut"></div></div>';
break;
case 3:
echo '<div id="facebook"><div class="facebook-midcut">',showfans($clubnames, $clubids, $cluburl),'</div><div class="l-botcut"></div></div>';
break;
case 4:
echo '<div id="facebook"><div class="facebook-midcut">',showfans($clubnightnames, $clubnightids, $clubnighturl),'</div><div class="l-botcut"></div></div>';
break;
case 5:
echo '<div id="facebook"><div class="facebook-midcut">',showfans($djnames, $djids, $djurl),'</div><div class="l-botcut"></div></div>';
break;
case 6:
echo '<div id="facebook"><div class="facebook-midcut">',showfans($hotelnames, $hotelids, $hotelurl),'</div><div class="l-botcut"></div></div>';
break;
case 7:
echo '<div id="facebook"><div class="facebook-midcut">',showfans($liveshownames, $liveshowids, $liveshowurl),'</div><div class="l-botcut"></div></div>';
break;
case 8:
echo '<div id="facebook"><div class="facebook-midcut">',showfans($restaurantnames, $restaurantids, $restauranturl),'</div><div class="l-botcut"></div></div>';
break;
case 9:
echo '<div id="facebook"><div class="facebook-midcut">',showfans($sunsetnames, $sunsetids, $sunseturl),'</div><div class="l-botcut"></div></div>';
break;
case 10:
echo '<div id="facebook"><div class="facebook-midcut">',showfans($villanames, $villaids, $villaurl),'</div><div class="l-botcut"></div></div>';
break;
default:
echo '<div id="facebook"><div class="facebook-midcut">',showfans($djnames, $djids, $djurl),'</div><div class="l-botcut"></div></div>';
}
?>
Код Ajax:
function categoryAjaxData(div,str,value)
{
var url = str+'?catid='+value;
ajaxData(div,url);
}
function ajaxData(div,str)
{
xmlHttp=GetXmlHttpObject();
document.getElementById(div).innerHTML='<center><img src="images/loader.gif"></center>';
if(xmlHttp==null)
{
alert("Browser does not support HTTP Request")
return
}
var url = str;
xmlHttp.onreadystatechange = function(){ DescriptionstateChanged(div); };
xmlHttp.open("GET",url,true);
xmlHttp.send(null);
}
function DescriptionstateChanged(div)
{
if(xmlHttp.readyState==4 || xmlHttp.readyState=="complete")
{
document.getElementById(div).innerHTML=xmlHttp.responseText;
}
}
Я чувствую, что в моих водах я почти на месте ... Может кто-нибудь предложить решение ... MarioVW, мистер Фон Знаний - можете ли вы дать просветление моей голове?