Tags:
create new tag
view all tags

SID-00219: How to call a custom perl script using forms in Twiki

Status: Answered Answered TWiki version: 4.2.3 Perl version: 5.8.4
Category: CategoryForms Server OS: Debian Linux Last update: 16 years ago

Hi, I am planing to include a page in twiki which can call a custom perl or shell script in server using forms in Twiki. The example could be some thing like there will be a text box where user can enter a text(say name of the person) and a drop down box for the user to select a command (say date or pwd). When the user clicks on the submit button a small browser window must appear showing the text entered by user and the out put of the command selected. we will be working on different linux and solaris machines at our work place. It will be great if we can integrate the monitoring activity on this servers in Twiki smile The out put of Linux commands like pwd date etc would be of great help

Below is the example of the script I would like to call from twiki

#!/bin/ksh

DATESTR="$(/bin/date)"
echo "<head></head><body>"days Date
echo "Today is ${DATESTR}"
echo "</body>"

-- RaghuKiran - 25 Mar 2009

Discussion and Answer

Please see HowToRunPerlOnDemand.

-- SeanCMorgan - 25 Mar 2009

You can embed an HTML form in a page and point the form action to a script that you have on your server. Here is an example. TWiki.org has a tzdate script that shows the current time in cities around the world.

View the raw text to see how this works. You can use some HTML to pop up a new window of some size. Study HTML docs on how to do that.

-- PeterThoeny - 25 Mar 2009

      Change status to:
ALERT! If you answer a question - or someone answered one of your questions - please remember to edit the page and set the status to answered. The status selector is below the edit box.
SupportForm
Status Answered
Title How to call a custom perl script using forms in Twiki
SupportCategory CategoryForms
TWiki version 4.2.3
Server OS Debian Linux
Web server

Perl version 5.8.4
Edit | Attach | Watch | Print version | History: r4 < r3 < r2 < r1 | Backlinks | Raw View | Raw edit | More topic actions
Topic revision: r4 - 2009-03-25 - PeterThoeny
 
  • Learn about TWiki  
  • Download TWiki
This site is powered by the TWiki collaboration platform Powered by Perl Hosted by OICcam.com Ideas, requests, problems regarding TWiki? Send feedback. Ask community in the support forum.
Copyright © 1999-2026 by the contributing authors. All material on this collaboration platform is the property of the contributing authors.