How to set max height using javascript

view a random? 318 views
function update() {
   var height = 0;
   if (sIe()){
      height = document.documentElement.clientHeight;
   } else {
      height = window.innerHeight;
   }
   div.style.height = (height-20) + "px";
}

I’ve been trying to snatch this code from somewhere… so I was pretty happy to find it. But also very impressed with the site that I snatched it from: projectX - It looks to me from the code that it uses GoogleMaps API. But the maps are provided by Terralink. Taking a look at smaps and ZoomIn, I notice that if Google Maps API is being used, it has been substantially extended. Though I’m not particularly sure why - I guess to allow Terralink to provide it’s resources to mapping New Zealand.

I am also impressed that the applications run Ruby-on-Rails. Not because I have any grasp of the technology - but everyone on slashdot was talking about it… So it must carry some weight. And it runs on Linux in an httpd called ‘Mongrel‘. That’s cool.

Last 5 posts by James Little
Share and Enjoy: These icons link to social bookmarking sites where readers can share and discover new web pages.
  • Digg
  • del.icio.us
  • Facebook
  • Google
  • MisterWong
  • Reddit
  • Scoopit
  • StumbleUpon
  • Technorati
  • rss

Related Posts:

One Comment

  1. Posted July 24, 2008 at 11:21 am | Permalink

    This post came from my blog at http://alphafoobar.com and was a little messy. I’ve just tidied it up and added some more tags.

Post a Comment

Your email is never published nor shared.