elreservado Posted September 22, 2006 Share Posted September 22, 2006 Could the shownotes of episode 1x05 be posted please if it ain't too much trouble? thanx Quote Link to comment Share on other sites More sharing options...
boristsr Posted September 22, 2006 Share Posted September 22, 2006 http://www.hak5.org/wiki/index.php?title=Episode_1x05 <-- here ;) for future reference, all shownotes are now stored on the wiki. Quote Link to comment Share on other sites More sharing options...
Famicoman Posted September 22, 2006 Share Posted September 22, 2006 Also, I didn't probobly do the code translation very well from Screen-to-notepad. So, if you know what you are doing, feel free to edit the code on there for gramatical purposes. Quote Link to comment Share on other sites More sharing options...
boristsr Posted September 22, 2006 Share Posted September 22, 2006 there's no code on that episodes page. which episode are you talking about? **edit** btw, that's not to sound rude, i was going to have a look over it. Quote Link to comment Share on other sites More sharing options...
elreservado Posted September 22, 2006 Author Share Posted September 22, 2006 The ajax notes with Jon are missing. Could someone post the if it ain't too much trouble?? (I've tried copying them from the video, but I can't get them to work. thx. By the way... ¿What is Jon's full name?? Quote Link to comment Share on other sites More sharing options...
boristsr Posted September 22, 2006 Share Posted September 22, 2006 Jonathon Goldsboro i beleive. give me a little and i'll see if i can get the code Quote Link to comment Share on other sites More sharing options...
elreservado Posted September 22, 2006 Author Share Posted September 22, 2006 Jonathon Goldsboro i beleive.give me a little and i'll see if i can get the code ¿title? Quote Link to comment Share on other sites More sharing options...
boristsr Posted September 22, 2006 Share Posted September 22, 2006 i unfortunately don't have the code. i can go through the episode and try and get it myself if you'd like? make sure though you are using a webserver for this, not just running it off a local file. you must be running it through apache or something. Quote Link to comment Share on other sites More sharing options...
elreservado Posted September 22, 2006 Author Share Posted September 22, 2006 i unfortunately don't have the code. i can go through the episode and try and get it myself if you'd like? make sure though you are using a webserver for this, not just running it off a local file. you must be running it through apache or something. yeah, I have run it with wamp, with no good results. I really wouldn't like to get you in the trouble of doing that just for me, thax for your help anyway. Quote Link to comment Share on other sites More sharing options...
boristsr Posted September 22, 2006 Share Posted September 22, 2006 well, being obsessive like i am, i wanted to see if it did work, so i wrote it out and chucked it on my apache server and it worked fine for me. Sample1.xml <?xml version="1.0" encoding="iso-8859-1"?> <root> No </root> index.html <html> <head> <title>Ajax Testing</title> </head> <script language="javascript">     //Set default http_request to false for initiation     var http_request = false;     function request(url)     {         http_request = false;                 // Mozilla, Safari, Opera and all other browsers use this request         if (window.XMLHttpRequest)         {             http_request = new XMLHttpRequest();             /*             NOTE:                 Some versions of the mozilla browsers won't work if the response from the **Missing comment**                 In order to fix this, we can use an extra function to override the header **missin comment**             */             if (http_request.overrideMimeType)             {                 http_request.overrideMimeType('text/xml');             }         }//Only IE uses this, NOTE: Active X Object         else if (window.ActiveXObject)         {             try             {                 http_request = new ActiveXObject("Msxml2.XMLHTTP");             }             catch (e)             {                 try                 {                     http_request = new ActiveXObject("Microsoft.XMLHTTP");                 }                 catch (e) {}             }         }         //if still false, then XMLHTTP instance is not created         if (!http_request)         {             alert('Cannot create an XMLHTTP instance');             return false;         }         http_request.onreadystatechange = readyState;         http_request.open('GET', url, true);         http_request.send(null);     }     function readyState()     {         //Displaying all http_request.readyState         if(http_request.readyState == 1)         {             alert("1 (loading)");         }         if(http_request.readyState == 2)         {             alert("2 (loaded)");         }         if(http_request.readyState == 3)         {             alert("3 (interactive)");         }         if(http_request.readyState == 4)         {             if (http_request.status == 200)             {                 var xmldoc = http_request.responseXML;                 var root_node = xmldoc.getElementsByTagName('root').item(0);                 alert(root_node.firstChild.data);             }             else             {                 alert('Error with request');             }         }     } </script> <body> <table width="200" border="0" align="center"> <tr><td> <span style="text-decoration: underline" onClick="request('sample1.xml')">Request XML</span> </td></tr> </table> </body> </html> try out that, if it doesn't work it's either your web server or your browser. it works for me with apache and firefox. now, to register and chuck it on the wiki! Quote Link to comment Share on other sites More sharing options...
elreservado Posted September 22, 2006 Author Share Posted September 22, 2006 well, being obsessive like i am, i wanted to see if it did work, so i wrote it out and chucked it on my apache server and it worked fine for me.try out that, if it doesn't work it's either your web server or your browser. it works for me with apache and firefox. now, to register and chuck it on the wiki! thank you so much, now at least I get the javascript alert messages, but I get alert number 1 repeated and on alert number 4 it gives me the exception "Error with request". ¿Could it be something with WAMP? Edit: I uploaded it into a real server and it throws me this error using IE: Line: 76 Char: 13 Error: Object required Code: 0 Quote Link to comment Share on other sites More sharing options...
boristsr Posted September 22, 2006 Share Posted September 22, 2006 possibly. what browser are you using? from that code, i don't think there is anything special required on the webserver side. but then again, i'm not a web programmer. i would think it is the browser, i know a lot of browsers don't support ajax. Quote Link to comment Share on other sites More sharing options...
elreservado Posted September 22, 2006 Author Share Posted September 22, 2006 possibly. what browser are you using?from that code, i don't think there is anything special required on the webserver side. but then again, i'm not a web programmer. i would think it is the browser, i know a lot of browsers don't support ajax. Can't be the browser, I've tried it both with firefox and IE. Can't be the server either. Are you sure it gives you the 4 alert messages each with different text?? Quote Link to comment Share on other sites More sharing options...
boristsr Posted September 22, 2006 Share Posted September 22, 2006 ok, based upon the info you chucked in the edit it's definately the browser. i may have copied it down wrong, your browser security may be too strong or maybe it's just a newer version of IE that isn't entirely backwards compatible (as i said, i'm not a web programmer so i don't know what has changed in IE since the episode was made). hopefully someone here can help you, but in the mean time i suggest google to find some other ajax examples and see how they handle IE. hth. Quote Link to comment Share on other sites More sharing options...
boristsr Posted September 22, 2006 Share Posted September 22, 2006 yeah mate, positive. except "1" is repeated for some reason. maybe it is the webserver then? i just tried IE 6 and it works fine for me too. i'm running apache on linux. and tried firefox on both linux and windows. **edit** btw, just to point something out, jon DOES specifically mention apache in the episode, so maybe it's possible there is something different between your webserver? having a different request status. try removing that if statement and the entire else block and just try and force it to run the true section, see if that works. 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.