Jump to content

prime

Members
  • Posts

    188
  • Joined

  • Last visited

    Never

Profile Information

  • Gender
    Not Telling

prime's Achievements

Member

Member (2/5)

0

Reputation

  1. eh I use VI or gedit mostly since I'm using a Linux os, and both of those have syntax highlighting so unfortunately for me, I can't use that
  2. Thx :-) and dang it your right about the language, thx for pointing that outm that'll help a lot
  3. Sure :-) I'm only starting Ajax so I definitely would like to see how someone more experienced would do it better
  4. pretty much as rat cate said said... for use with your aps use mysql, but you can use XML for getting data between aps, languages more easily, that's really the purpose of XML a way toe exchange data easily between applications/languages
  5. 1 question, the request as in request is my Ajax object which is... var request = null; function createRequest() { try { request = new XMLHttpRequest(); } catch(trymicrosoft) { try { request = new ActiveXObject("Msxml2.XMLHTTP"); } catch(othermicrosoft) { try { request = new ActiveXObject("Microsoft.XMLHTTP"); } catch(failed) { request = null; } } } }
  6. it works in my firefox but not in firefox on a different computer, it also has a problem with opera
  7. I have the following code for a chat display app I made and well it works perfectly on some browser but not others, can someone tell me where I went wrong with it please... I think it's something to do with the recursion, but I'm not 100% sure <html><head> <script src="../ajaxrequest.js"></script> <script langauge="JavaScript">function updatePage() { if(request.readyState == 4) { var xmlobj = request.responseXML var id = xmlobj.getElementsByTagName("postid")[0].childNodes[0].nodeValue var user = xmlobj.getElementsByTagName("user")[0].childNodes[0].nodeValue var message = xmlobj.getElementsByTagName("message")[0].childNodes[0].nodeValue usermessage = user + ": " + message; if(previd == undefined) { Display = "<p>Welcome to Primefalcon's AJAX chat have a seat and enjoy your stay</p><br /><br />"; } else if(previd == id) { Display = prevdata; } else { Display = prevdata + "<br />" + usermessage; } document.getElementById("pagedisplay").innerHTML = Display; previd = id; prevdata = Display; }}</script> <style type="text/css"> body { background-color: #000066; } #pagedisplay { color: #000000; } </style> </head><body bgcolor="white"><font color="black"> <script langauge="JavaScript"> var previd; var prevdata; function main() { createRequest(); var serverurl = "server_display.php"; request.open("GET", serverurl, true); request.onreadystatechange = updatePage; request.send(null); //just add + for extra info setTimeout('main()', '300'); } main(); </script> <div id="pagedisplay"></div> </body></html>
  8. I understood the principle of it from when I started, about 3 years ago, but even once I learn most everything else I just kept putting off learning it... Every time I had to rewrite code or modify existing stuff to fit in I had that niggle in my mind telling me I should learn OOP to save time. Though I guess I still have to deal with polymorphisation, whatever that is.... Anyhow back I'm off back to my silly little browser model and make script to learn this stuff.... I've always hated following set examples you can't experiment as easy :-) Thx again :-)
  9. Thx a lot :-) I know this is basic stuff, I've been doing php for quite a while now and but some dang reason I am having problem with oop lol I can see how this is going to save a huge amount of work though
  10. Hi I am trying to work out how to call another function from inside the same class, I have had a look around and can't seem to find an answer, thank you I have the code below... I'm trying to access the browserMake funtion from inside the browserModel function, is this possible? <?php class agentCheck { function browserMake() { //determine the users browser $browser_detect = $_SERVER['HTTP_USER_AGENT']; if(preg_match("/SlimBrowser/", "$browser_detect")) { return "Slim Browser"; } elseif(preg_match("/Opera/", "$browser_detect")) { return "Opera"; } elseif(preg_match("/MSIE/", "$browser_detect")) { return "Internet Explorer"; } elseif(preg_match("/Firefox/", "$browser_detect")) { return "Firefox"; } elseif(preg_match("/Chrome/", "$browser_detect")) { return "Chrome"; } elseif(preg_match("/Safari/", "$browser_detect")) { return "Safari"; } elseif(preg_match("/Konqueror/", "$browser_detect")) { return "Konqueror"; } elseif(preg_match("/Minefield/", "$browser_detect")) { return "Minefield"; } elseif(preg_match("/K-Meleon/", "$browser_detect")) { return "K-Meleon"; } elseif(preg_match("/Mozilla/", "$browser_detect")) { return "Mozilla"; } else { return "undefined"; } } function browserModel() { $browser_detect = $_SERVER['HTTP_USER_AGENT']; $browsers_make = browserMake(); return "$browsers_make"; } } $lets = new agentCheck; $browser = $lets->browserModel(); ?>
  11. you can grep to recover files but overwritten files, sorry there is no real way to get them back regardless of some cooperations say that try to get you to buy their secure deletion programs....
  12. Anyone know where to find a good tutorial for this?
  13. well the only thing that's new in Ajax is the xmlhttprequest, without that it's not ajax, so if you want to call that one thing a whole language, I guess who cares
  14. I don't think I have I have that script anymore I changed my desktop os from Windows to Linux (got sick of some repeating problems). I figured I'd try and see if I could find a couple of good tutorials before I try again
  15. I have one question regarding designing custom error handling. I have tried creating a bunch of custom error handling scripts, but they haven't been able to pick up on syntax errors for some reason. I.E the syntax error stills gets printed to the screen and not emailed. Can anyone point me to a good tutorial on custom error handling?
×
×
  • 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.