function openTokenTypeSelWindow(lovFieldName) { document.forms[0].lovName.value = lovFieldName; // openWindow(top,'/em/console/target/sel/postBackWithEvent?eventParam=initializeTokentypeSelection&_em.coIFR=true&no_frame=/faces/sdk/nonFacesWrapper', 'lovWindow', {width:750, height:550}, true, 'dialog', ''); window.open('/em/console/target/sel/postBackWithEvent?eventParam=initializeTokentypeSelection','lovWindow',{width:750, height:550}, true, 'dialog', ''); } function myTokenTypeSel() { //Create the table proxy object var proxy = new TableProxy("TOKEN_TYPE_TABLE"); //Get the selected index of a single-selection table var selectedIndex = proxy.getSelectedRow(); //Return, if no row selected if(selectedIndex == -1) { top.close(); } //Get the selected token type var tokentypeName = proxy.getFormElement("tokentype", selectedIndex); //Get the LOV name in the parent page var lovName = document.forms[0].lovName.value; var dest; if(lovName != "") { dest = eval("window.opener.document.forms[0]." + lovName); } else { dest = eval("window.opener.document.forms[0]." + "tokenType"); } //This is the event generated when Token Type selector returns var retEvent = "tokenTypeSelected"; if(retEvent != "") { //New form action for the parent form var newFormAction = window.opener.document.forms[0].action; if(newFormAction.indexOf("?") > 0) { newFormAction = newFormAction + "&event=" + retEvent; } else { newFormAction = newFormAction + "?event=" + retEvent; } newFormAction = newFormAction +"&selectedIdx="+selectedIndex; //Submit the form in the parent window window.opener.document.forms[0].action = newFormAction; window.opener.document.forms[0].submit(); } //Return top.close(); return false; } function myIndexSel(retEventName) { //Create the table proxy object var proxy = new TableProxy("HEALTHTABLE"); //Get the selected index of a single-selection table var selectedIndex = proxy.getSelectedRow(); //Return, if no row selected if(selectedIndex == -1) { top.close(); } //Get the selected token type var tokentypeName = proxy.getFormElement("tokentype", selectedIndex); //Get the LOV name in the parent page var lovName = document.forms[0].lovName.value; var dest; if(lovName != "") { dest = eval("window.opener.document.forms[0]." + lovName); } else { dest = eval("window.opener.document.forms[0]." + "indexName"); } //This is the event generated when Text Index selector returns var retEvent = retEventName; if(retEvent != "") { //New form action for the parent form var newFormAction = window.opener.document.forms[0].action; if(newFormAction.indexOf("?") > 0) { newFormAction = newFormAction + "&event=" + retEvent; } else { newFormAction = newFormAction + "?event=" + retEvent; } newFormAction = newFormAction +"&selectedIdx="+selectedIndex; //Submit the form in the parent window window.opener.document.forms[0].action = newFormAction; window.opener.document.forms[0].submit(); } //Return top.close(); return false; }