Resize modal window/dialog based on the content changes - Javascript Browser Object Model

Javascript examples for Browser Object Model:Window innerHeight

Description

Resize modal window/dialog based on the content changes

Demo Code

ResultView the demo in separate window

<!doctype html>
<html>
   <head> 
      <title>test</title> 
   </head> 
   <body>
       test//  ww  w.  ja v  a 2  s . co m
      <br>
       test adjust
      <br>
       test adjust
      <br>
      <br> 
      <script language="javascript">
function adjustDialog() {
                window.dialogHeight = 400+'px';
                window.dialogWidth = 400+'px';
}
        
      </script> 
      <button onclick="adjustDialog();">Adjust me</button>  
   </body>
</html>

Related Tutorials