/* *+------------------------------------------------------------------------+ *| Licensed Materials - Property of IBM *| BI and PM: prmt *| (C) Copyright IBM Corp. 2002, 2011 *| *| US Government Users Restricted Rights - Use, duplication or *| disclosure restricted by GSA ADP Schedule Contract with IBM Corp. *| *+------------------------------------------------------------------------+ */ // function for the Prompt Data Source dialog. function F_pdsCallback( v_oState, v_sInvoke ) { var v_fCallback = null; switch( v_sInvoke ) { case "parent": v_fCallback = ( parent ? parent.pdsCallback : null ); break; case "opener": v_fCallback = ( window && window.opener ? window.opener.pdsCallback : null ); break; default: v_fCallback = ( typeof pdsCallback != "undefined" ? pdsCallback : null); if ( !F_isValidFunction( v_fCallback ) ) { v_fCallback = ( parent ? parent.pdsCallback : null ); } if ( !F_isValidFunction( v_fCallback ) ) { v_fCallback = ( window && window.opener ? window.opener.pdsCallback : null ); } break; } if ( F_isValidFunction( v_fCallback ) ) { try { v_fCallback( v_oState ); } catch (e) { var v_sMsg = ""; if ( e && e.name ) { v_sMsg += e.name + "\n"; } if ( e && e.message ) { v_sMsg += e.message; } if ( v_sMsg ) { alert( v_sMsg ); } } } } function F_isValidFunction( v_fct ) { // For IE: typeof window.opener.pdsCallback will be 'object', not the expected 'function'. var v_sType = (typeof v_fct); return ( v_sType != "undefined" && v_sType == "function" || ( v_sType == "object" && v_fct !== null ) ); } function F_pdsSetFormValue( v_sName, v_sValue ) { if ( document.formWarpRequest[ v_sName ] ) { document.formWarpRequest[ v_sName ].value = v_sValue; } else { var temp = createInputElement( v_sName, v_sValue ); document.formWarpRequest.appendChild( temp ); document.formWarpRequest[ v_sName ] = temp; } } function createInputElement(name, value) { var newInputElement = document.createElement("input"); newInputElement.setAttribute("name", name); newInputElement.setAttribute("value", value); newInputElement.setAttribute("type", "hidden"); return(newInputElement); }