window.resizeTo( … )

See here:

  1. You can't resize a window or tab that wasn’t created by
  2. You can't resize a window or tab when it’s in a window with more than one tab.
  3. Also, even if you create window by it is not resizable by default ...see 4.
  4. To make window created by resizable, you must open it with resizable feature
myExternalWindow ="", "myWindowName", "resizable");
myExternalWindow.resizeTo(500,500); //resize window to 500x500

Passing selected value into HTML select onchange handler

So you have a <select> element and you want to call a handler, but you need to pass the selected value to the handler because you have multiple instances of the same <select> and can't access them by ID (because there is many, one of which will have the new selected value, but you don't know which). The solution is to pass in the newly selected value, like this:

<select onchange='handle_change( this.value )'>