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)
dcr value in a cgi-callout
aces
How do you pass a dcr value to a cgi-callout?
item name="file">
<label>File</label>
<description>&nbsp;Click Browse to choose a PDF
or Word document within TeamSite, or click Upload to select one from your PC.</description>
<text>
<cgi-callout url="/iw/webdesk/templating/single_file_upload/index.jsp?upload_directory=/$dcrVariable/&valid_extensions=pdf,doc" label="New File" window-Features="width=400,height=144,resizable=no,status=yes,toolbar=no,scrollbars=yes"/>
</text>
</item>
Find more posts tagged with
Comments
jbonifaci
All of the content of the DCR is automatically sent to the cgi-callout in the post data. So if you want to get the value of the item named 'upload_directory' from the dcr, just do something like this:
my $page = new CGI;
my $upload_directory = $page->param('upload_directory');
Hope this helps,
Jeff Bonifaci
source.zip
28573.pdf
aces
Thanks for the respond.
Is it the same if the cgi-callout is a .jsp file? The code you show me is in perl right?
jbonifaci
Yes, what I posted was perl. I believe in a jsp you would do something like this:
String upload_directory = request.getParameter('upload_directory');
Jeff
aces
I tried that and also:
Division = mySmartUpload.getRequest().getParameter('GeneralInfo.upload_directory');
and
Division = mySmartUpload.getRequest().getParameter('upload_directory');
but I got
org.apache.jasper.JasperException: Unable to compile class for JSPD:\iw-home\servletd\work\localhost_8080%2Fiw%2Fwebdesk\_0002ftemplating_0002fsingle_0005ffile_0005fupload_0002findex_0002ejspindex_jsp_25.java:184: Invalid character constant.
Division = mySmartUpload.getRequest().getParameter('upload_directory');
I don't have to pass in the item name from the dcr?
Edited by aces on 07/24/03 02:01 PM (server time).
james1
In Java, you need to put those strings in double-quotes, not single-quotes.
-- James
--
James H Koh
Interwoven Engineering