function getItemValue(itemName) { var item = IWDatacapture.getItem(itemName); return (item)? item.getValue() : null;}
> 2. Modify existing Calendar to use get / set FormAPI callouts. > the following will work: window.opener.api.YourCallback(YourParameters);This has been driving me crazy, because I've seen it work in the past, as per your suggestions.In my .js I have a basic function that simply has an alert("It works");Yet calling it from the .ipl like this: window.opener.api.getItemValue();Nothing happens.The whole time I've been working with this Calendar app, its as if it doesn't know that the DCR is the window.opener.That's why I'm so frustrated. I learned so much from the last thread that I was ready to employ it here and 'build it correctly.' But it's not working as expected
If something like that is the case, you still have an opener. Problem is that it's not pointing to theDC Form any longer! What happens if you temporarily remove/comment-out Yahoo stuff and leave just test call-back?
That's what I was worried about, the yui script causing the child to lose the parent. Is there some way of 'scanning' for all opened windows?I have attached the .ipl file with all the calendar code totally stripped out, and when I click the 'hello' button I still get this error: "window.opener.api is null or not an object"Yet, this exact code calls back to the parent perfectly fine if I set the datacapture.cfg to 'callout url.'At this point, I'm thinking I might have just two options:1: Figure out if it's possible to 'scan' for all open windows and try to find the DCT.2: Use that 'hack' calendar that uses call outs that you posted.Unfortunately, #2 requires client sign-off and that is usually harder then the coding
var api = window.opener.top.getScriptFrame();api.hello();
Oh wow, that did it. The child is now talking to the parent when using the 'callout url' method.So, is this api object actually the formapi object for the DCT, or is it just a javascript window object?
This one is a FormAPI Object ( Actually, one of the six DC Form Window Frames )
Did you managed to resolve this issue. If yes than can you share the code with us.