You should look into using a goog.ui.Dialog - http://docs.closure-library.googlecode.com/git/class_goog_ui_Dialog.html
Here is a demo of how to use one : http://closure-library.googlecode.com/git/closure/goog/demos/dialog.html
After instantiating one, you would use the setContent
method to place your form as the content html of the dialog.
You can also extend the goog.ui.editor.AbstractDialog class ( http://docs.closure-library.googlecode.com/git/class_goog_ui_editor_AbstractDialog.html ), which helps manage an internal reference to a goog.ui.Dialog rather than directly creating one and gives convenient hide
and show
methods.
__
As a sidenote, it's typically viewed as an anti-pattern in Javascript to use the "new Array()
" syntax rather than var userList = [];
for reasons specified here and elsewhere.