Merge branch 'master' of github.com:FinalsClub/karmaworld
[oweals/karmaworld.git] / karmaworld / assets / js / note-iframe.js
1   // resize the iframe based on internal contents on page load
2   function autoResize(id){
3       var newheight;
4       var newwidth;
5
6       if(document.getElementById){
7         newheight = document.getElementById(id).contentWindow.document .body.scrollHeight;
8         newwidth = document.getElementById(id).contentWindow.document .body.scrollWidth;
9       }
10
11       document.getElementById(id).height = (newheight+ 10) + "px";
12       document.getElementById(id).width= (newwidth + 5) + "px";
13       //alert('height: ' + newheight);
14   }
15