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)
Using Callouts with a Visual Format field
Bjorn
Has anyone ever used a callout to populate a visual format instance?
I am trying to and in the javascript callback, it doesn't even recognize the visual format field as an element.
In the script below the "calloutForm.elements[i-1].value = value;
" should be the visual format field, but it's "skipping" it and going to the previous field, which would seem to be "calloutForm.elements[i-2].value = value"
<script>
function callback(key, value){
var calloutForm = eval($form_name);
for ( i = 0 ; i < calloutForm.elements.length ; i++ ) {
if (calloutForm.elements
.name == '$element_name'){
calloutForm.elements
.value = key;
calloutForm.elements[i-1].value = value;
break;
}
}
opener.top.datacapture.refreshForm();
self.close()
}
</script>
Find more posts tagged with
Comments
Migrateduser
I am not sure it would be more reliable, but can you use FormAPI to locate and populate the item? This looping is really old school.
querychange.rptdesign
Bjorn
I need it to be a callout in the form (template). FormAPI is great for setting the visibility of items or making them readonly, etc. It's not as great for calling out to an external CGI which reads XML and dumps results back in.
Migrateduser
You can use FormAPI in a CGI (or JSP for that matter) callout. It's much easier than the old way. Right now your CGI is generating JavaScript that is pretty cluttered; it would just generate FormAPI instead.
Bjorn
How would the FormAPI be less cluttered? I need to iterate through a collection of replicants. I thought a for loop was the best way to do that.
gzevin
i do something similar, but not the visual format, but rather my own RTF callout that substitutes VisualFormat. I remember, that returning values was not trivial, because of the use of IFRAME.
does anybody know whether Ektron uses IFRAME?
Greg Zevin, Ph.D. Comp. Sc.
Independent Interwoven Consultant/Architect
Sydney, AU