Archive for January, 2006

JavaScript : HTTP Get

Posted on January 10, 2006. Filed under: Uncategorized |

I would like to grab http://www.yahoo.com/ website by JavaScript. I found the JavaScript library, “request.js” (XmlHttpRequest Wrapper) from http://adamv.com/dev/. Demo here!
This is my JavaScript example to grab web page from yahoo.com
<script src="request.js"></script>
<span id="HttpContents">NO DATA</span>
<script>
Http.get({
 url: "http://www.yahoo.com/",
 callback: getHttpContents,
 cache: Http.Cache.GetNoCache
}, [HttpContents]);
function getHttpContents(result,HttpContents){
 if (result.status==Http.Status.OK){
  HttpContents.innerHTML = result.responseText;
 } else {
  HttpContents.innerHTML = "An error occurred (" + result.status.toString() + [...]

Read Full Post | Make a Comment ( 2 so far )

JavaScript Sleep() 2

Posted on January 3, 2006. Filed under: Uncategorized |

I found an article Implementing Wait in JavaScript, wrote by Josef Betancourt
This is his example
function Pause(duration, busy){ this.duration= duration * 1000; this.busywork = null; this.runner = 0; if (arguments.length == 2) { this.busywork = busy; } this.pause(this.duration);}

Pause.prototype.pause = function(duration){ if ( (duration == null) || (duration < 0)){ return; } var [...]

Read Full Post | Make a Comment ( None so far )

JavaScript Sleep()

Posted on January 3, 2006. Filed under: Uncategorized |

How do I pause execution in JavaScript?
How do I pause execution in JavaScript?
Is there a wait statement in JavaScript?
Is there a sleep method to pause execution?
Is there a sleep method to pause execution?

I found a useful article how do I pause execution in JavaScript to description how to delay JavaScript process.
some example
function pause(numberMillis) { var [...]

Read Full Post | Make a Comment ( 2 so far )

Liked it here?
Why not try sites on the blogroll...