title: use window.open in case of chrome
body: <p>since <code>window.showModalDialog</code> doesn't work on chrome, I'm using it in case of <code>firefox</code> and in <code>chrome</code> I'm using window.open but my problem is that the return value of window.open is undefined maybe because the javascript continue before i close the child window so I tried to put the code in this condition <code>if (returnValue.closed)</code> .. but the problem is that the child window is loading all the time and i can't choose my value from it. </p>
  
  <p>This is my code:</p>
  
  <pre><code>if (window.showModalDialog) {
     var retVal = window.showModalDialog(...)
  
  if (!window.showModalDialog) {
   var retVal = window.open(...);
              while (a == 0) {
                  if (retVal.onload()) {
                      if (retVal.closed) {
                          if (retVal != null) {...
                          }
                      }
                  }
          }
      }
  </code></pre>
  
  <p>Any help is highly appreciated.</p>