3
Mar

Javascript Fake window

   Posted by: Vivek Khokhar   in javascript

Javascript window.open returns an object that points to the newly open window. this is how you can make fake window objects to fool some page reloads :
Function dummyWindow will return a Window object whose reload doesn’t do anything

function _location(){
this.reload=_reload;
function _reload(){
return;
}
}
function dummyWindow(){
this.location = new _location();
}

Its a Hack but usefull in some scenarios

This entry was posted on Friday, March 3rd, 2006 at 3:48 am and is filed under javascript. You can follow any responses to this entry through the RSS 2.0 feed. You can leave a response, or trackback from your own site.

Leave a reply

You must be logged in to post a comment.