-
Posts
549 -
Joined
-
Last visited
Never
Everything posted by Gayner
-
When I go here: /forums/rofl.php?&s=hey I want it to show up: <gt> <status>hey</status> </gt>
-
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 ?
-
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 ?
-
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?
-
What about this: http://www.w3schools.com/jsref/jsref_encodeURI.asp ?
-
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
-
%s ?
-
IS This calling all rows or just specified one's?
Gayner replied to Gayner's topic in PHP Coding Help
Yea so it wont be calling all of ibf members only 1's i need ? -
IS This calling all rows or just specified one's?
Gayner replied to Gayner's topic in PHP Coding Help
So t hen I should LIMIT it to like 10 because about 10 m.'s ? Thanks -
IS This calling all rows or just specified one's?
Gayner replied to Gayner's topic in PHP Coding Help
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 ? -
IS This calling all rows or just specified one's?
Gayner replied to Gayner's topic in PHP Coding Help
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 -
IS This calling all rows or just specified one's?
Gayner replied to Gayner's topic in PHP Coding Help
So, thanks for ur reply but is there anyway I dont call everything in ibf_members and just what i need thx? -
IS This calling all rows or just specified one's?
Gayner replied to Gayner's topic in PHP Coding Help
I dont get? so every row in my ibf_members is being called and the m.id's ? -
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. ?
-
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
-
Help me convert this script to only read 1hour..
Gayner replied to Gayner's topic in Javascript Help
It's part of a lottery script That's why Anyway Is there anyway If I remove the * 24 it will work? -
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
-
I got no error message it just ran query each time i refreshed the page and not when i played tic tac toe..
-
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
-
It wont work because $id is not found.. anywere EDIT: I saw ur edit sec
-
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 ?
-
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?
-
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
-
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
-
WOW Screw it it wont work php and javascript suck together man, lol