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)
menu item
vinylrecord
can anyone help us with this...
We have created our own menu item in the teamsite by making changes in /etc/iw.cfg..
like
custom_menu_item_myitemname="File","Publish_ge","gen.cgi","admin, master","scrollbars=yes,resizable=yes,width=640,height=545"
..
The above menu option can be seen..from the web desk.
But we want that when we select this option, user is able to specify a parameter which will be passes to a shell script
which is written in /softwares folder.The name of the shell script is generate.sh and it takes a parameter say <name>.
so the command is $sh /softwares/generate.sh <name>
This parameter we want the user to specify when he selects the Publish_ge option.
So can you tell us how to write the cgi file which will do this for us
i.e
1. accept the parameter name from user.
2.ivoke the shell script.
or any other way out..
thanks in anticipation ....
Find more posts tagged with
Comments
tvaughan
In your example, I'm assuming that the parameter to pass to generate.sh can be pretty much anything the user types in, and is
not
something your can determine programmatically by looking at the executing user's environment variables. If this assumption is wrong, then the following advice is waaay overcomplicated.
Anyway, you should have your gen.cgi display a little intro page that prompts the user for input with a standard HTML form and maybe QA's the user's input. On submit of that form, your gen.cgi will pass the user's input to a "gen_response.cgi" that will
A) execute the generate.sh
capute the output
C) format and display the output in HTML to the user.
Does this make sense?
Tom
vinylrecord
hi , i think you have undestood our problem, can u tell us in in more detail.. any html file are writing is giving us server error, can u tell us the syntax...it will be a help for us..
thanks..
vinylrecord
hi, we have the entry in /etc/iw.cfg file as..
custom_menu_item_myitemname="File","Publish1","area.itml","admin, master","scrollbars=yes,resizable=yes,width=640,height=545"
the file area.itml.. just has at present..
<html>
<head>
<body>
<input type="text" name="enter name" value="enter name">
</body>
</html>
but i am getting an error.
The server encountered an internal error or misconfiguration and was unable to complete your request.
Please contact the server administrator, and inform them of the time the error occurred, and anything you might have done that may have caused the error.
More information about this error may be available in the server error log.
--------------------------------------------------------------------------------
Apache/1.3.26 Server at 3.205.72.47 Port 80
so .. waht extension should we give, where should it be.. etc plz tell.
tvaughan
Dude,
You're gonna need to investigate CGI, because you can't just use a plain HTML file as the target for a custom menu item.
To help you get started do this:
1) Create a file in $IWHOME/httpd/iw-bin/test.cgi
2) Make that file executable (775 , or , rwxrwxr-x)
3) Point to test.cgi in your iw.cfg file
4) Copy the file "show_env.cgi" into test.cgi
5) Get a good CGI/Perl book and play around with it.
Tom
Migrateduser
There is an example using what looks like an HTML file in iw.cfg, not sure if this would work.
custom_menu_item_tsdemos="File", "TeamSite Demo", "file:/iw/flash_demos/open-me.html", "all", "scrollbars=yes,resizable=yes,width=640,height=545"
vinylrecord
what tags i need to add in the html file, can a normal html file be written, and what about the extension with which it should be saved? i have seen some files as .itml?
so... what how to write the html file?any examples or links..for that
output.pdf
BalancedTablesSeparated.ssd.zip
JamJamT
vinyl....
Scroll to the top of your devnet window, where it says search type in the following:
CGI sample
vinylrecord
hi, now i have writtena simple .cgi file and some code is like this..
print $page->textfield(-name=>'Course_Name',
-default=>"",
-size=>'40',
-override=>1,
);
this shows a test box. now how can i retreive the value the user has given in this text box ina variable..
.
JamJamT
That's good. Keep following the example in TechNote 048816, pay close attention to the "StartForm" subroutine. To help you better understand what vars are being passed I'd recommend you first change the action of your form to point to show_env.cgi.