Jump to content

Gayner

Members
  • Posts

    549
  • Joined

  • Last visited

    Never

Everything posted by Gayner

  1. When I go here: /forums/rofl.php?&s=hey I want it to show up: <gt> <status>hey</status> </gt>
  2. using this: function njAJAX() { this.callback = 0; this.waitingResponse = 0; this.url = ""; this.method = "GET"; this.params = null; this.errorCallback = 0; this.xmlObj = 0; this.getPage = function(pageURL, pageCallback) { if(this.waitingResponse) return; if(pageURL) this.url = pageURL; if(pageCallback) this.callback = pageCallback; try { this.xmlObj = new XMLHttpRequest(); } catch (error) { try { this.xmlObj = new ActiveXObject("Microsoft.XMLHTTP"); } catch (error) { } } if(!this.xmlObj) return; var o = this; this.xmlObj.onreadystatechange = function() { if(o.xmlObj && o.xmlObj.readyState == 4 && o.xmlObj.status == 200) { if(!o.xmlObj.responseXML && o.errorCallback) o.errorCallback(); o.waitingResponse = 0; if(o.callback) o.callback(o); } } this.xmlObj.open(this.method, this.url, true); this.xmlObj.send(this.params); this.waitingResponse = 1; } this.getElementNodeValue = function(eName, eIndex) { var e = this.xmlObj.responseXML.getElementsByTagName(eName); if(!eIndex) eIndex = 0; if(e && e[eIndex] && e[eIndex].childNodes && e[eIndex].childNodes[0]) return e[eIndex].childNodes[0].nodeValue; } } Sir please ?
  3. function njAJAX() { this.callback = 0; this.waitingResponse = 0; this.url = ""; this.method = "GET"; this.params = null; this.errorCallback = 0; this.xmlObj = 0; this.getPage = function(pageURL, pageCallback) { if(this.waitingResponse) return; if(pageURL) this.url = pageURL; if(pageCallback) this.callback = pageCallback; try { this.xmlObj = new XMLHttpRequest(); } catch (error) { try { this.xmlObj = new ActiveXObject("Microsoft.XMLHTTP"); } catch (error) { } } if(!this.xmlObj) return; var o = this; this.xmlObj.onreadystatechange = function() { if(o.xmlObj && o.xmlObj.readyState == 4 && o.xmlObj.status == 200) { if(!o.xmlObj.responseXML && o.errorCallback) o.errorCallback(); o.waitingResponse = 0; if(o.callback) o.callback(o); } } this.xmlObj.open(this.method, this.url, true); this.xmlObj.send(this.params); this.waitingResponse = 1; } this.getElementNodeValue = function(eName, eIndex) { var e = this.xmlObj.responseXML.getElementsByTagName(eName); if(!eIndex) eIndex = 0; if(e && e[eIndex] && e[eIndex].childNodes && e[eIndex].childNodes[0]) return e[eIndex].childNodes[0].nodeValue; } } WERE CAN I FIND what name is loading for my .xML ?
  4. i want to use this code inside my rofl.php .. <?xml version="1.0" encoding="UTF-8" standalone="yes"?> <gt> <status><![CDATA[2]]></status> </gt> my rofl.php: <?php // Load and Start IPB SDK require_once "ipbsdk/ipbsdk_class.inc.php"; $SDK =& new IPBSDK(); global $ibforums; echo $_GET["s"]; mysql_query("UPDATE ibf_members SET s = '". mysql_real_escape_string($_GET["s"]) ."' WHERE id='{$ibforums->member["id"]}'"); ?> how?
  5. What about this: http://www.w3schools.com/jsref/jsref_encodeURI.asp ?
  6. function MakeRequest() { var xmlHttp = getXMLHttp(); xmlHttp.onreadystatechange = function() { if(xmlHttp.readyState == 4) { HandleResponse(xmlHttp.responseText); } } xmlHttp.open("GET", "rofl.php", true); xmlHttp.send(null); } and rofl.php is : mysql_query("UPDATE ibf_members SET points = points+0.25 WHERE id={$ibforums->member["id"]} LIMIT 1"); So my users get 0.25 Forum Cash each time rofl.php is called. But i want my javascript to beable to hide that "rofl.php" so my users cant view source and find it and just keepr efreshing
  7. Yea so it wont be calling all of ibf members only 1's i need ?
  8. So t hen I should LIMIT it to like 10 because about 10 m.'s ? Thanks
  9. Like im calling m.id, m.name, m.joined, m.posts, m.desktop from ibf_members, and I ONLY Want those to be called, i dont want the rest of ibf_members to be called because I have a huge table Bump ?
  10. Like im calling m.id, m.name, m.joined, m.posts, m.desktop from ibf_members, and I ONLY Want those to be called, i dont want the rest of ibf_members to be called because I have a huge table
  11. So, thanks for ur reply but is there anyway I dont call everything in ibf_members and just what i need thx?
  12. I dont get? so every row in my ibf_members is being called and the m.id's ?
  13. SELECT COUNT(p.pid) as tpost, m.id, m.name, m.joined, m.posts, m.desktop FROM ibf_posts p, ibf_members m " am I also calling all my ibf_members table rows? or only the 1's with m. ?
  14. I want to be bable to run the php redirection location header when it's been 3minutes possibler ? thanks so i can kick my users back to index
  15. It's part of a lottery script That's why Anyway Is there anyway If I remove the * 24 it will work?
  16. function countdown(Time_Left) { Today = new Date(); if(Time_Left < 0) Time_Left = 0; time_left2=Time_Left; days = Math.floor(Time_Left / (60 * 60 * 24)); Time_Left %= (60 * 60 * 24); hours = Math.floor(Time_Left / (60 * 60)); Time_Left %= (60 * 60); minutes = Math.floor(Time_Left / 60); Time_Left %= 60; seconds = Time_Left; dps = 's'; hps = 's'; mps = 's'; sps = 's'; //ps is short for plural suffix. if(days == 1) dps =''; if(hours == 1) hps =''; if(minutes == 1) mps =''; if(seconds == 1) sps =''; document.getElementById("countdown").innerHTML = days + ' day' + dps + ' '; document.getElementById("countdown").innerHTML += hours + ' hr' + hps + ' '; document.getElementById("countdown").innerHTML += minutes + ' min' + mps + ' and '; document.getElementById("countdown").innerHTML += seconds + ' sec' + sps; //Recursive call, keeps the clock ticking. time_left2--; setTimeout('countdown('+time_left2+');', 1000); } I only want it to countdown each 1hour only, not days? Help ? Thx
  17. I got no error message it just ran query each time i refreshed the page and not when i played tic tac toe..
  18. function findwinner(isplayer){ me=(isplayer)? 1 : 2; for(n=1;n<=8;n++){ if( (moves[ways[n][1]]==me) && (moves[ways[n][2]]==me) && (moves[ways[n][3]]==me) ){ iswon=true; break; }} if(iswon){ if(isplayer){ playerwins[level]++; playerstarts=true; writetext(3); }else{ pcwins[level]++; playerstarts=false; writetext(2); }}else{ if(done>{ draws[level]++; playerstarts=!playerstarts; writetext(1); }else if(isplayer) pcturn(); }} theres the function for ya
  19. It wont work because $id is not found.. anywere EDIT: I saw ur edit sec
  20. ok well can u help me on that? in my other thread? i want to use that away man, i think that would do it ?
  21. Yea but my QUERY IS IN PHP..... It's only getting called if a JAVASCRIPT Function is called. javascript - > then php it should work why not?
  22. It's possible with AJAX. Ok so i have this: <?php function test(){ $sql = mysql_query("UPDATE ibf_members SET points = points+0.25 WHERE id={$ibforums->member["id"]} LIMIT 1"); return $sql; } ?> And I want it to run: when this happens: case 3: content='You won this round. <?php echo test(); ?>'; and Case 3 get's called here: if(iswon){ if(isplayer){ playerwins[level]++; playerstarts=true; writetext(3); }else{ pcwins[level]++; playerstarts=false; writetext(2); }} So i can't do this unless I use ajax? WOW
  23. I want to beable to run a mysql query if a if function in javascript is called! POSSIBLE ? I DONT THINK SO.. help me? Please! lol
  24. WOW Screw it it wont work php and javascript suck together man, lol
×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.