I am trying to pass a value from one iview to another. That part is working. The subscribe event is picking up the event and firing the javascript. However I am not able to access the inputfield from the javascript that is fired from the subscribe event. The same javascript if fired through a button will set the inputfield with no issues.
JavaScript:
function setParameters()
{var funcName = htmlb_formid+"_getHtmlbElementId";
func = window[funcName];
var corpID = eval(func("if_CorpID"));alert(" corp id = " + corpID.getValue());}
EPCM.subscribeEvent("urn:com.harlandclarke:speqsraminfo", "runRAMChgsReport",setParameters);The above EPCM event cannot access the value of if_CorpID as it is listed as undefined, yet with the button push all works well.
Here is the htmlb line....
<hbj:inputfield id="if_CorpID" visible = "true" jsObjectNeeded="true" type="string" size="5" maxlength="10" value="3300"/>
and the button
<hbj:button id="btn_applyfilters" text="Apply Filters" width="90px" tooltip="" onClientClick="holdForLoad()" disabled="false" design="STANDARD"/>
If I use this button on the above javascript everything works fine. Any ideas as to why it works with the button push from the iview and not when it is called from the EPCM function? The iview has had plenty of time to load.