How to get Browser Window Size?
function getBroWinSize() {
var objDocEle = document.documentElement;
var objDocBdy = document.body;
var myWidth = 0, myHeight = 0;
if( typeof( window.innerWidth ) == 'number' ) { //Non-IE
myWidth = window.innerWidth;
myHeight = window.innerHeight;
}
else if(objDocEle &&(objDocEle.clientWidth || objDocEle.clientHeight)) { //IE 6+
myWidth = objDocEle.clientWidth;
myHeight = objDocEle.clientHeight;
}
else if(objDocBdy &&(objDocBdy.clientWidth || objDocBdy.clientHeight)){ //IE 4
myWidth = objDocBdy.clientWidth;
myHeight = objDocBdy.clientHeight;
}
window.alert( 'Width = ' + myWidth );
window.alert( 'Height = ' + myHeight );
}//getBroWinSize
Tuesday, August 25, 2009
Tuesday, August 18, 2009
What is JavaScript library?
What is JavaScript library?
A JavaScript library is a library of pre-written JavaScript controls which allow for easier development of JavaScript-based applications, especially for AJAX and other web-centric technologies. (eg:- JQuery, Mybic...)
A JavaScript library is a library of pre-written JavaScript controls which allow for easier development of JavaScript-based applications, especially for AJAX and other web-centric technologies. (eg:- JQuery, Mybic...)
Sunday, August 16, 2009
Suppress JavaScript error
Code to Suppress JavaScript error
</SCRIPT>
<SCRIPT language="JavaScript">
<!--
function suppressJSError() {
return true;
}
window.onerror=suppressJSError;
//-->
function suppressJSError() {
return true;
}
window.onerror=suppressJSError;
//-->
</SCRIPT>
Subscribe to:
Posts (Atom)