Jump to content

Niccaman

Members
  • Posts

    83
  • Joined

  • Last visited

    Never

Everything posted by Niccaman

  1. Lets say I have: function example(){ // code 1 } ...already declared in the document. Now i need to insert some new code as an extension of the 'example()' so that it will run example() and then my newer code. For example, I know this isnt possible, but I wanna do this: example.extend(function(){ // code 2 }); ... so that when I call 'example()' later, it will run both code 1 AND code 2.
  2. Thanks, I will do that. As long as I understand what you mean by pages having different urls. They are all their own filenames in say a single folder. Good enough?? Thanks.
  3. Whoops, im using referrer, but ofcourse thats the page your come from. How do u get ur current url?
  4. I want to be able to identify every page by a unique ID I dont want to manually assign every page i have with a personal ID. Is there a way of giving each page a unique ID based on file location or something?? I thought the URL using HTTP_REFERRER, but when u have a GET variable, it seems to be empty... Thanks in advance.
  5. Ok, i guess you guys would know if anybody. Thankyou for your time guys, i really appreciate it. ...Problem is, any error messages from the one time script wont echo as i am effectively reloading the page. Any ideas? either way topic solved
  6. I have a variable in the URL which i wanted for one-time processing. Obviously once the page is loaded the client still has this variable and its value still in the URL, meaning, if they refresh, some code will be processed again. So what i want to do is remove this variable from the url. e.g. "./something.php?variable=true" ... how will i remove "?variable=true" using php?? Thanks in advance.
  7. I have a script which gets an elements innerhtml, which is "08". I run parseInt on it, and it returns "0". Any ideas?
  8. No, this second page has a google maps API in it, and wont work just loading the second page INTO the first page. I wanna actually have another page/tab open.
  9. I've seen this done on other websites, and i need to find a way to do this: I have my page opened, lots of information inside different input fields, and after clicking a link on this page will take them to another page, where they do something to get more information, then post/get that information back to the first page without ever reloading that first page. Please, how do i do this? There is only one workaround that i can think of, which i dont want to do which is posting all the information from the first to the second, then post it all back with the extra info. (also could do with sessions, but again dont wanna do that.)
  10. One step ahead of you. I simply tested it without the extras after "..." so full sql query: SELECT * FROM `stuff` WHERE `daterenewal` > NOW() Conditions is still fulfilled. // Cancel, i forgot to put the date a lesser value (from previous testing i changed it to above NOW()) and it now works. My statement had some ORs after the "..." and i believe order of precedence meant it was like bracketing the first 2 conditions, whilst leaving the rest independent. So, "WHERE `x` = 'y' AND `x` = 'y' OR `x` = 'y' ..." became "WHERE (`x` = 'y' AND `x` = 'y') OR `x` = 'y' ..."
  11. Array ( [NOW()] => 2009-06-30 12:36:09 ) ... Yeh its all good. This is so annoying. Why is it happening!? The condition shouldn't be fulfilled...
  12. Array ( [Field] => daterenewal [Type] => datetime [Null] => NO [Key] => [Default] => 0000-00-00 00:00:00 [Extra] => )
  13. $query = "SELECT * FROM `stuff` WHERE `daterenewal` > NOW() AND ..."; $res=mysql_query($query); if (mysql_num_rows($res)) { while ($row=mysql_fetch_object($res)) { ... // This is always fulfilled and returning the row with date earlier than now. } }else { echo "No search results"; }
  14. erm.. if im not right when i say timestamp, i dont know what u mean. its got like: "0000-00-00 00:00:00" as its value. Ive tried putting the date within the range that timestamp is targeted too, with no luck. Ive also tried changing the column type to datetime
  15. This has been driving me nuts for the last 2 hours. I have a timestamp column with a timestamp earlier than now. It always returns the row to me, when it shouldnt. It should just come up with no results, but it keeps giving me the bloody row!! My statement is: $query = "SELECT * FROM `stuff` WHERE `daterenewal` > NOW() AND ..."; $query = "SELECT * FROM `stuff` WHERE `daterenewal` < NOW() AND ..."; Ive tried everything i can think of, including: $query = "SELECT * FROM `stuff` WHERE `daterenewal` > CURDATE() AND ..."; $t = time(); $query = "SELECT * FROM `stuff` WHERE UNIX_TIMESTAMP(`daterenewal`) > $t AND ..."; Everything i tried failed. Ive even tried converting the column to datetime instead.
  16. I'm a bit of a noob with Ajax. I believe i understand most of the ajax process, but i am curious as to whether i am allowed to have more than 1 simultaneous running ajax functions. Say i have an ajax operation running, then another ajax function to another file is called. This seems to cease the previous operation from finishing its processes. Say: var xmlHttp; function example1() { xmlHttp=GetXmlHttpObject(); if (xmlHttp==null) { alert ("Browser does not support HTTP Request"); return; } var url="/example.php"; url=url+"?id=1"; url=url+"&sid="+Math.random(); xmlHttp.onreadystatechange=function stateChanged() { if (xmlHttp.readyState==4 || xmlHttp.readyState=="complete") { document.getelementbyid('example').innerHTML = xmlHttp.responseText; } }; xmlHttp.open("GET",url,true); xmlHttp.send(null); } function example2() { xmlHttp=GetXmlHttpObject(); if (xmlHttp==null) { alert ("Browser does not support HTTP Request"); return; } var url="/example2.php"; url=url+"?id=1"; url=url+"&sid="+Math.random(); xmlHttp.onreadystatechange=function stateChanged2() { if (xmlHttp.readyState==4 || xmlHttp.readyState=="complete") { document.getelementbyid('example2').innerHTML = xmlHttp.responseText; } }; xmlHttp.open("GET",url,true); xmlHttp.send(null); } function GetXmlHttpObject() { var xmlHttp=null; try { // Firefox, Opera 8.0+, Safari xmlHttp=new XMLHttpRequest(); } catch (e) { //Internet Explorer try { xmlHttp=new ActiveXObject("Msxml2.XMLHTTP"); } catch (e) { xmlHttp=new ActiveXObject("Microsoft.XMLHTTP"); } } return xmlHttp; } Is it because im using the same variable "xmlHttp" for both of these functions??? Will they run independent of each other if i make 2 variables? because i figured they are inside their own functions and arent global....
  17. That didnt work but it gave me an idea. i simply got the submit button which is used by the user, and clicked it with .click(); solved.
  18. standard behaviour is for the else statement to always occur. Rather you missed the if part if anything. The if part is fulfilled when you abort the operation with the leader, whilst being in the lobby (the part with the chat box from the op you just aborted) with another user. IF the op has been removed from the database (s=effect of aborting) the other user isnt meant to be on the page, and the submit is a method of notifying the user. The if part is fulfilled in order to have this effect, though right now, nothing happens. ..basically, when you abort, the if statement is fulfilled with the OTHER user.
  19. that error only occurs in the else part of the if statement. it has no reprucussions and only occurs when chat box is empty. it should bear no effect on anything else.
  20. lol dont worry, i temporarily disabled the 12 hour effect so that i could programme this in. just abort it, retry as many times as you want. I can always enter in more money.
  21. yes, but abort with lobby leader (festivesix) whilst having the lobby on screen for the other user (testing1). the chat refresh does so every 10 seconds, alternatively, you can try and chat in order to activate the form submit. Both events will cause 'temp == 1'. if you chat you will trigger 'function transcript(num)' with 'document.abortForm.submit();' if you wait for refresh you will trigger 'function refreshTranscript(num)' with 'document.forms[0].submit();' ... (I left 2 different codes from 2 different events so that you can see both times fail). remember, the condition will only be fulfilled if you do not navigate away from the page after aborting with the other user. (Also, organised is the correct way to spell in the english dictionary - British)
  22. invite him with lobby leader (festivesix) or find the lobby using auto join/advanced search feature.
  23. testing1 password is asd like festivesix both accounts are sufficient
×
×
  • 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.