OZONE Asylum
Forums
DHTML/Javascript
When did you start with Ajax?
This page's ID:
28757
Search
QuickChanges
Forums
FAQ
Archives
Register
Edit Post
Who can edit a post?
The poster and administrators may edit a post. The poster can only edit it for a short while after the initial post.
Your User Name:
Your Password:
Login Options:
Remember Me On This Computer
Your Text:
Insert Slimies »
Insert UBB Code »
Close
Last Tag
|
All Tags
UBB Help
Just found this snippet stored away on one of my harddrives. Dated March 2003:[code]/***********************\ * Dynamic File Reader * * by: Liorean * \***********************/ function File(){ var r; switch(0+(1*(typeof document.getElementById!='undefined')+2*(typeof clientInformation!='undefined')+4*(typeof netscape!='undefined'))*(typeof opera=='undefined')){ case 3: r=new ActiveXObject('Microsoft.XMLHTTP'); break; case 4: r=new NN4HttpRequest; break; case 5: r=new XMLHttpRequest; break; default: r={ open:function(){}, send:function(){return false}, responseText:'' }; break } this.prototype=r; return r; } function NN4HttpRequest(){ this.url=this.responseText='' } NN4HttpRequest.prototype.open=function(m,u){ this.method=m||'GET'; this.url=u } NN4HttpRequest.prototype.send=function(){ if(this.url=='')return false; if(!/^[a-z]+:/.test(this.url)) this.url=String(window.location).replace(/\/[^\/]*$/,'/'+this.url); var l, b; this.responseText=''; b=new java.io.BufferedReader(new java.io.InputStreamReader(new java.net.URL(this.url).openStream())); while((l=b.readLine())!=null) this.responseText+=l+'\n'; if(b!=null) b.close(); return true }[/code]Seems you can teach old dogs new tricks after all :) -- var Liorean = { abode: "[sigrotate][url]http://liorean.web-graphics.com/[/url]|[url]http://codingforums.com/[/url]|[url]http://web-graphics.com/[/url][/sigrotate]", profile: "[url]http://codingforums.com/member.php?u=5798[/url]"};
Loading...
Options:
Enable Slimies
Enable Linkwords
« Backwards
—
Onwards »