{"id":78,"date":"2005-01-06T21:57:37","date_gmt":"2005-01-07T01:57:37","guid":{"rendered":"http:\/\/www.dr-chuck.com\/wordpress\/?p=78"},"modified":"2011-12-17T12:17:45","modified_gmt":"2011-12-17T16:17:45","slug":"new-year-more-blogging","status":"publish","type":"post","link":"https:\/\/www.dr-chuck.com\/csev-blog\/2005\/01\/new-year-more-blogging\/","title":{"rendered":"New Year &#8211; More Blogging"},"content":{"rendered":"<p>I will try to cover my experiences with the Sakai project more fully.  It will probably mean that my writing will be more inane as the blog will become more of a diary.  Oh well.  I apologize in advance.<br \/>\nToday was a lot of meetings but I indilged myself and worked on trying to replace the Sakai Courier function with an iframe and refreash with XMLHttpRequest object.<br \/>\nThings went well, except that nothing ever worked on Mike Elledge&#8217;s computer.  Finally it came down to the fact that caching was happening.<br \/>\nA good refernece is available at: http:\/\/developer.apple.com\/internet\/webcontent\/xmlhttpreq.html<br \/>\nSo the lesson is to hack the URL so that no matter what caching is happening.  Here is some code that is a bit more sophisitcated than the Apple example.<\/p>\n<pre>\nfunction loadXMLDoc(url) {\nif ( req && callInProgress(req) ) {\nalert(\"Previous request had not completed stat=\"+req.status+\" state=\"+req.readyState+\" url=\"+lastUrl);\nreq.abort();\n}\n\/\/ Add a random number to defeat caching regardless of the user setting\nlastUrl = url + \"&rand=\" + Math.random();\nif (window.XMLHttpRequest) {\nreq = new XMLHttpRequest();\nif ( req ) {\nreq.onreadystatechange = processReqChange;\nreq.open(\"GET\", lastUrl, true);\nreq.send(null);\nsetStatus(\"XML Request started (\"+couriertries+\")\"+lastUrl);\n} else {\nalert(\"Cannot create XML Request Object\");\n}\n\/\/ branch for IE\/Windows ActiveX version\n} else if (window.ActiveXObject) {\nreq = new ActiveXObject(\"Microsoft.XMLHTTP\");\nif (req) {\nreq.onreadystatechange = processReqChange;\nreq.open(\"GET\", lastUrl, true);\nreq.send();\nsetStatus(\"ActiveX Request started (\"+couriertries+\")\"+lastUrl);\n} else {\nalert(\"Unable to create ActiveX object!\");\n}\n} else {\nalert(\"There is no support for XMLHttpRequestObject\"+url);\n}\n}\nfunction callInProgress(xmlhttp) {\nswitch ( xmlhttp.readyState ) {\ncase 1, 2, 3:\nreturn true;\nbreak;\n\/\/ Case 4 and 0\ndefault:\nreturn false;\nbreak;\n}\n}\n<\/pre>\n","protected":false},"excerpt":{"rendered":"<p>I will try to cover my experiences with the Sakai project more fully. It will probably mean that my writing will be more inane as the blog will become more of a diary. Oh well. I apologize in advance. Today was a lot of meetings but I indilged myself and worked on trying to replace [&hellip;]<\/p>\n","protected":false},"author":2,"featured_media":0,"comment_status":"closed","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[1],"tags":[],"class_list":["post-78","post","type-post","status-publish","format-standard","hentry","category-uncategorized"],"_links":{"self":[{"href":"https:\/\/www.dr-chuck.com\/csev-blog\/wp-json\/wp\/v2\/posts\/78","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.dr-chuck.com\/csev-blog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.dr-chuck.com\/csev-blog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.dr-chuck.com\/csev-blog\/wp-json\/wp\/v2\/users\/2"}],"replies":[{"embeddable":true,"href":"https:\/\/www.dr-chuck.com\/csev-blog\/wp-json\/wp\/v2\/comments?post=78"}],"version-history":[{"count":1,"href":"https:\/\/www.dr-chuck.com\/csev-blog\/wp-json\/wp\/v2\/posts\/78\/revisions"}],"predecessor-version":[{"id":2150,"href":"https:\/\/www.dr-chuck.com\/csev-blog\/wp-json\/wp\/v2\/posts\/78\/revisions\/2150"}],"wp:attachment":[{"href":"https:\/\/www.dr-chuck.com\/csev-blog\/wp-json\/wp\/v2\/media?parent=78"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.dr-chuck.com\/csev-blog\/wp-json\/wp\/v2\/categories?post=78"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.dr-chuck.com\/csev-blog\/wp-json\/wp\/v2\/tags?post=78"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}