I am still not clear about what you want to do. Dialogs are modal in Photoshop which means when the line dlgname.show() executes the script stops until the user closes the dialog. If you want to check the user's input while the dialog is open you can do that with event handlers. Or you can check the values after the dialog is closed. Or you can do both.
It is possible to open another dialog while one is showing. But again that is done in the main dialog. And if you want the script to do something with what the user entered in the dialog you do that after the dialog is closed( at least for most scripts )
var w = new Window('dialog','dlgName');
w.info = w.add('button',undefined,'Info');
w.done = w.add('button',undefined,'OK',{name:'ok'});
w.cancel = w.add('button',undefined,'Cancel',{name:'cancel'});
w.info.onClick = function(){
var w = new Window('dialog','info'); w.stInfo = w.add('statictext',undefined,'Some info for the user'); w.done = w.add('button',undefined,'OK',{name:'ok'}); w.cancel = w.add('button',undefined,'Cancel',{name:'cancel'}); w.show();
}
var res = w.show();
if(res==1){// user clicked on the ok button
// do something
}else{// user canceled the dialog // do something else or accept the user wants to quit
}
The code you posted is not complete but it looks like you are trying to show the same dialog more than once. You can not reshow a dialog after it has been closed.