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)
how-to pass a parameter to cgi-callout
Valentine
Is there any way to pass the extra parameter to the cgi-callout?
There should be some way of appending the variable to the POST request, but I can not find the way to do it.
Find more posts tagged with
Comments
Jeremy
HEre is how we do it...
<cgi-callout label="Browse" url="/iw-bin/iw_cgi_wrapper.cgi/script.ipl?startdir=images" window-features="width=500,height=260,resizable=yes,toolbar=no,scrollbars=no" />
In this case it passes a parameter startdir=images which can be pulled out in the script.
Hope this sets you on the right direction.
Jeremy
Valentine
hmm ...
Does iw_cgi_wrapper.cgi appends the GET request to the POST data that is sent to the script?
Right now when I click on the button on the DCT page it send the POST request to that script with all of the DCT values as parameters, and everything after the script name is ignored.
I've tried using the script without the cgi_wrapper with the same results.
We have Solaris 8 with TS 5.5.2 SP4
Jeremy
Have a look in the <iw-home>/httpd/iw-bin directory. There should be a script show_env.cgi. Try calling this in your cgi-callout. Also try calling it with show_env?some=variable and it should output all the different environment variables it receives.
Make sense?
LooseCannon
Are you sure that the appended parameter is ignored by the CGI Callout? I think you can access the parameter by reading $ENV{'QUERY_STRING'}. If not, print out all ENV variables, you'll find it.
james1
To use Jeremy's method, your CGI would need to inspect both POST and GET inputs, which, to be picky, is not exactly kosher with the HTTP spec.
An alternative is to use a URL such as:
/path/to/your.cgi/param=value/another_param=another_value
e.g., use PATH_INFO to pass additional data to your CGI.
-- James
--
James H Koh
Interwoven Engineering
Jeremy
Thanks John, I hadn't seen it done that way before and this was the only/easy way I could figure it out.
I'll try to use that method in the future.
Jeremy
gzevin
well, *that* way is in the manual
RTFM
))
Greg Zevin, Ph.D. Comp. Sc.
Independent Interwoven Consultant/Architect
Sydney, AU