kdhearon Posted February 14, 2009 Share Posted February 14, 2009 since i suck at explaining this here is a image to show what i am talking about Also would like it like this The site is www.the-leg.net/xcg The ajax.php is <?php header("Content-Type: text/javascript"); include("_mysql.php"); include("_settings.php"); include("_functions.php"); $get = safe_query("SELECT * FROM ".PREFIX."squads"); ?> squads = new Array(); <?php $i=1; while($ds = mysql_fetch_array($get)){ echo "squads[".$i."] = '".$ds['name']."';\n"; $i++; } ?> cur = 1; var max = <?=mysql_num_rows($get);?>; var http_request = false; function ajax_request(url) { if(url<=0) url = max; if(url>max) url = 1; cur = url; url = 'ajax_squads.php?s='+url; //alert(cur); http_request = false; if (window.XMLHttpRequest) { // Mozilla, Safari,... http_request = new XMLHttpRequest(); if (http_request.overrideMimeType) { http_request.overrideMimeType('text/xml'); // zu dieser Zeile siehe weiter unten } } else if (window.ActiveXObject) { // IE try { http_request = new ActiveXObject("Msxml2.XMLHTTP"); } catch (e) { try { http_request = new ActiveXObject("Microsoft.XMLHTTP"); } catch (e) {} } } if (!http_request) { //$(div).innerHTML = 'Ende Kann keine XMLHTTP-Instanz erzeugen'; return false; } http_request.onreadystatechange = function (){ if (http_request.readyState == 4) { if (http_request.status == 200) { //$(div).innerHTML = http_request.responseText; // $('squad_name').innerHTML = squads[cur]; //alert(http_request.responseText); } else { //$(div).innerHTML = 'Bei dem Request ist ein Problem aufgetreten.'; } } }; http_request.open('GET', url, true); http_request.send(null); } It is just not working right. I cant figure it out. Please help! Quote Link to comment Share on other sites More sharing options...
kdhearon Posted February 15, 2009 Author Share Posted February 15, 2009 I am welling to pay for some help on this. Or someone to make this script work. Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.