Web 2.0, Ruby, Rails, TDD, BDD,
rSpec, XMPP, BOSH, REST,
Javascript, Ajax, Google Maps API,
Google Gears API, CSS,
Java, C#, Social Network, RMagick, Nginx
Tuesday, June 5, 2007
Google Talk on Web
Now, Google Talk is available on the web. You don't need to install google talk client on your machine anymore. This web is very scalable, fast, and efficient. Check this out http://talkgadget.google.com/talkgadget/popout
Labels:
news
Browser Dimensions and Document Scroll Offsets
Determining browser dimensions
IE:
document.body.clientWidth & document.body.clientHeightFirefox:
window.innerWidth & window.innerHeight
<script type="text/javascript">
document.write("Your browser\'s dimensions are: ")
if (window.innerWidth) //if browser supports window.innerWidth
document.write(window.innerWidth+" by "+window.innerHeight)
else if (document.all) //else if browser supports document.all (IE 4+)
document.write(document.body.clientWidth+" by "+document.body.clientHeight)
</script>
Determining document scroll offset coordinates
IE:
document.body.scrollLeft & document.body.scrollTopFirefox:
window.pageXOffset & window.pageYOffsetThere is a pitfall on IE when you uses a doctype at the top of the page. The way to accessing the DSOC properties in IE6 changes, namely, from document.body to document.documentElement.
var iebody=(document.compatMode && document.compatMode != "BackCompat")? document.documentElement : document.body
var dsocleft=document.all? iebody.scrollLeft : pageXOffset
var dsoctop=document.all? iebody.scrollTop : pageYOffset
http://www.javascriptkit.com/javatutors/static2.shtml
Labels:
javascript
Subscribe to:
Posts (Atom)