Discussions
Categories
Groups
Community Home
Categories
INTERNAL ENABLEMENT
POPULAR
PUBLIC CLOUD
PRIVATE CLOUD
Quick Links
MY LINKS
HELPFUL TIPS
Back to website
Home
Web CMS (TeamSite)
callout to form
MattP
I am looking to write a callout and could use some direction. here is what I am looking to do. From a template, enable users to browse a list of documents on another system (not interwoven). I can get a form with a list of documents and folders, when the user clicks on an object (either folder or document) and in return produce a URL to that object. So, my question is, how do I "pass" that response and insert it in the DCT? The page is in a form, but I have control over how that page is built.
I am familiar with writing callouts, I am just not sure how to pass the info between the two pages.
Thanks in Advance
matt
TS 5.5.2
Win2K
Matthew Petitjean
BOC Group
Murray Hill, NJ 07974 USA
Find more posts tagged with
Comments
jbonifaci
Prior to FormAPI this required a bit more work, but now it is as simple as:
opener.parent.getScriptFrame().IWDatacapture.getItem("Item Name").setValue("My Value");
gzevin
If you are willing to stick to callout's javascript, it is fairly well documented ... - and could be done without FormAPI - whatever you prefer.
e.g. this is the code from my filebrowser callout:
function set_datacapture_item_value(selectedValue ){
var template = "WORKAREA";
var wa = selectedValue.substring(selectedValue.indexOf(template) + template.length , selectedValue.length);
var temp_wa = wa.substring ( wa.indexOf ("\/")+1, wa.length);
wa = temp_wa.substring ( temp_wa.indexOf ("\/"), temp_wa.length);
var newString = wa.replace(/[/]/g,"/");
if ((parent.window.opener == null)|| (parent.window.opener.closed)) {
return false;
}
var calloutFormtemp = 'parent.' + '$form_name' ;
var calloutForm =eval(calloutFormtemp);
if (!calloutForm) {
return false;
}
var calloutElementFound =false;
for (i =0 ;i < calloutForm.elements.length ;i++) {
if (calloutForm.elements [i ].name =='$element_name') {
calloutForm.elements [i ].value = newString;
calloutElementFound =true;
break;
}
}
if (!calloutElementFound){
return false;
}
return true;
}
Greg Zevin, Ph.D. Comp. Sc.
Independent Interwoven Consultant/Architect
Sydney, AU
MattP
THanks. I will work through this today.
Matt
Matthew Petitjean
BOC Group
Murray Hill, NJ 07974 USA