home *** CD-ROM | disk | FTP | other *** search
/ Inside Dreamweaver 4 / IDW4.ISO / pc / Projects / ch22 / Exercise_Files / Exercise_09 / Resize.js < prev   
Encoding:
Text File  |  2001-01-22  |  477 b   |  23 lines

  1. function resizeBrowserWindow(width,height) {
  2.     window.resizeTo(width,height); 
  3. }
  4. function behaviorFunction() {
  5.     return "resizeBrowserWindow"; 
  6. }
  7.  
  8. function canAcceptBehavior() {
  9. return ("onMouseUp");
  10. }
  11.  
  12. function applyBehavior() { 
  13.     var width=document.theForm.width.value;
  14.     var height=document.theForm.height.value;
  15.     return "resizeBrowserWindow(" + width + "," + height + ")";
  16. }
  17.  
  18. function initializeUI() {
  19.   document.theForm.width.focus(); 
  20.   document.theForm.width.select(); 
  21. }
  22.  
  23.