Discussions
Categories
Groups
Community Home
Categories
INTERNAL ENABLEMENT
POPULAR
THRUST SERVICES & TOOLS
CLOUD EDITIONS
Quick Links
MY LINKS
HELPFUL TIPS
Back to website
Home
Web CMS (TeamSite)
Triggering CCI from a CGI Callout
adam1
I have a template where the author has to select a file that was generated by another DCT. It is very possible that the thing the user wants to select hasn't been created yet, so what I want to is have a callout that starts up new DCR (the type is always known) which the user can then select when they are done.
Does anyone know what I need to use for the URL attribute of the CGI callout tag?
Find more posts tagged with
Comments
Migrateduser
You could get a new dcr form with the following URL pattern:
http://server/iw/webdesk/templating/DatacaptureServlet?iw_tdt=category/type&iw_action=newdcr
However, CGI callouts actually post the entire form and various hidden values to the CGI. This may cause problems for you if you are callout out to the new dcr, since one of the values it does post is iw_tdt of the current form. In addition, you would be sending data that is not needed. A better way would be to use formapi to listen for the callout button event, open a window and direct that window to the appropriate URL. For example:
function init()
{
//Do init stuff...
IWEventRegistry.addItemHandler("/itemWithCallout","onCallout",openNewDCR);
}
function openNewDCR(item)
{
//Open a window for new dcr.
var calloutWindow = window.open("
http://server/iw/webdesk/templating/DatacaptureServlet?iw_tdt=category/type&iw_action=newdcr
","calloutWindow");
}
init();
--Daniel