Discussions
Categories
Choose a Product
THRUST SERVICES
CORE APPS
CE PRODUCTS
...
Quick Links
POPULAR
HELPFUL TIPS
Groups
My Links
FOR SIGNED IN MEMBERS:
Back to website
Home
TeamSite
TeamSite, LiveSite and OpenDeploy
FormAPI download/upload
System
I am trying to allow a file to be downloaded for edit, then uploaded after edit, through a DCT. It seems to work in some cases, but it always opens the document twice - once in word and once in the browser. Is there any way to avoid this? I would prefer to avoid a CGI callout if I can get by without it. Any suggestions?
<container name="Word" combination="and" hide-name="t">
<item name="Download" colspan="4">
<label></label>
<text>
<cgi-callout label="Download" />
<default>-</default>
</text>
</item>
<item name="Upload">
<label></label>
<text>
<cgi-callout label="Upload" />
<default>-</default>
</text>
</item>
</container>
<script><![CDATA[
function download()
{
var parameters = new Object();
parameters.vpath = getDocument();
IWDatacapture.callServer( "/iw/webdesk/edit", parameters, true );
}
function upload()
{
var parameters = new Object();
parameters.vpath = getDocument();
IWDatacapture.callServer( "/iw/webdesk/upload", parameters, true );
}
IWEventRegistry.addItemHandler( "/Word/Download", "onCallout", download );
IWEventRegistry.addItemHandler( "/Word/Upload", "onCallout", upload );
IWDatacapture.getItem( "/Word/Download" ).setValue( "-" );
IWDatacapture.getItem( "/Word/Upload" ).setValue( "-" );
IWDatacapture.getItem( "/Word/Download" ).setReadOnly( true );
IWDatacapture.getItem( "/Word/Upload" ).setReadOnly( true );
]]></script>
Find more posts tagged with
Comments
There are no comments yet