I'd like to call a CGI-callout script on
onSaveNameSpecified event using FormAPI. In this callout I'd like to offer the user to categorize the entered content. Then automatically apply changes to the DCR (put the categorization information into DCR) and save it.
The reason why I want to use a callout, is because I need all the entered content (all the <item> values) to make classification suggestions. And callout gets all this data passed by TeamSite in the
$cgi->{form} hash.
Something like this:
<script>
<![CDATA[
function handle_saveNameSpecified(path) {
// callout script here, like /iw-bin/categorize_callout.cgi
// script makes suggestions for the categories the content may be related to
// (therefore I need the whole content has been entered by the user)
// (categories could be e.g. sports, culture, middle east ...)
// user reviews, makes changes and approves
// put the selected categories into the DCR and save it using FormAPI
return true;
}
function init () {
IWEventRegistry.addFormHandler("onSaveNameSpecified", handle_saveNameSpecified);
}
init();
]]>
</script>
Do somebody have any ideas how to reach this approach?
We are using TS 5.5.2.