Skip to content

Category Archives: javascript

Windows Media Player Events

Value     State     Description 0     Undefined         Windows Media Player is in an undefined state. 1     Stopped            Playback of the current media item is stopped. 2     Paused             Playback of the current media item is paused. When a media item is                     [...]

  • Share/Bookmark

DOM Select : Setting Onchange cross browser way

This is how you set event handler that works.. for all [code] selColumn.onchange = "func()"; var onChangeHandler = new Function(selColumn.onchange); if (selColumn.addEventListener) { selColumn.addEventListener('change', onChangeHandler, false ); } else if (selColumn.attachEvent) { selColumn.attachEvent('onchange', onChangeHandler); } [/code]

  • Share/Bookmark

Javascript Fake window

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 [...]

  • Share/Bookmark