List content of item in the combobox


 
Thread Tools Search this Thread
Top Forums Shell Programming and Scripting List content of item in the combobox
# 1  
Old 05-12-2011
List content of item in the combobox

I have a combo.cgi here. this is linux environment
What i am going to do is this combobox will list down all the flatfile name in this /u/test/cgi-bin/List directory.
after that, i wanted it to open the flatfile and display the content of the flatfile into another listbox or textarea in this page once the item is selected in the combobox.
Pls guide me here

print "Content-type: text/html\n\n";
print "<html><head>";
print "</head><body>";


Code:
@testList = `ls -1 /u/test/cgi-bin/List`;


print "<select name=\"testDropList\">";
print "<option></option>";
for(@testList){
$testName = $_; 
       print "<option value=\"$testName\">$testName</option>";
}
print "</select>";

Login or Register to Ask a Question

Previous Thread | Next Thread

10 More Discussions You Might Find Interesting

1. Shell Programming and Scripting

Script to process a list of items and uncomment lines with that item in a second file

Hello, I have a src code file where I need to uncomment many lines. The lines I need to uncomment look like, C CALL l_r(DESNAME,DESOUT, 'Gmax', ESH(10), NO_APP, JJ) The comment is the "C" in the first column. This needs to be deleted so that there are 6 spaces preceding "CALL".... (7 Replies)
Discussion started by: LMHmedchem
7 Replies

2. Shell Programming and Scripting

Read a lis, find items in a file from the list, change each item

Hello, I have some tab delimited text data, file: final_temp1 aname val NAME;r'(1,) 3.28584 r'(2,)<tab> NAME;r'(3,) 6.13003 NAME;r'(4,) 4.18037 r'(5,)<tab> You can see that the data is incomplete in some cases. There is a trailing tab after the first column for each incomplete row. I... (2 Replies)
Discussion started by: LMHmedchem
2 Replies

3. UNIX for Dummies Questions & Answers

List all File Content its subdirectory

Is there anyway to display the file content in a subdirectory that starts or ends with a certain filename, say .txt? or start with NTS $ ls * dos2unix.bat dos2unix.exe test.txt FilePermissions: filepermission.html NTSLA32_SystemDrive.txt NTSLA36_regedit.txt filepermission.sh ... (1 Reply)
Discussion started by: alvinoo
1 Replies

4. Shell Programming and Scripting

How to list the content of a directory

Hi I want to write a script that reads a directory name, checks if the directory exists and lists the content of that directory. That's what I have at the moment. function listDirectory { echo "Give in a directory name" read name #Here I want to check if the... (4 Replies)
Discussion started by: hss
4 Replies

5. Shell Programming and Scripting

list file content

I need help. I have this file, it has 2 fields with at least 300 lines: 1 4 2 3 3 6 4 2 . . 300 5 My output should be for every line in input file the output should be like this, for example line 1: wget http://somewebsite/page=1&line=1 wget http://somewebsite/page=1&line=2 wget... (4 Replies)
Discussion started by: zorrox
4 Replies

6. Shell Programming and Scripting

Replacing content from a list

Okay, so I am not quite sure the best way of going about this. I have a whole stack of files that need items replaced with a code corresponding to it. In particular, I am looking to replace the names of countries with the two letter iso country code. The files themselves are in csv format with... (4 Replies)
Discussion started by: johnlee
4 Replies

7. Shell Programming and Scripting

HOWTO list website content

Hello Does anyone know how to list a website content I mean i have a URL and i want to know what is the name the size and the date of the differents files I have red "wget man page" but i didn't see which option can do this I don't even know if wget is exactly the command i need I... (2 Replies)
Discussion started by: the_bouk
2 Replies

8. UNIX for Dummies Questions & Answers

How to list content with file name ?

I want to search the string including the symbol like 'search' for example, file a.txt in \\dir contains, a for 'appable' b for 'banana' c for 'cat' s for 'search' Here I need to display(serach outpur) like \\dir\a.txt s for 'search' ... ... How to list content with file name... (5 Replies)
Discussion started by: gkskumar
5 Replies

9. Shell Programming and Scripting

list content of tar

Dear Friends , $tar tf testing.tgz a b c d e $tar tf testing.tgz a a $tar tf testing.tgz a a a tar: a: Not found in archive tar: Error exit delayed from previous errors I don't know the reason, why last command got failed .How to solve above problem . (1 Reply)
Discussion started by: dharanivasan
1 Replies

10. Shell Programming and Scripting

retrieve what the currently selected item is in a dropdown select list using perl tk

I have a dropdown menu built in perl tk (I am using active state perl). I want to select a value from the dropdown menu and I want to be able to perform some other actions depending upon what value is selected. I have all the graphical part made but I dont know how to get the selected value. Any... (0 Replies)
Discussion started by: lassimanji
0 Replies
Login or Register to Ask a Question
ttk::combobox(3tk)						 Tk Themed Widget						ttk::combobox(3tk)

__________________________________________________________________________________________________________________________________________________

NAME
ttk::combobox - text field with popdown selection list SYNOPSIS
ttk::combobox pathName ?options? _________________________________________________________________ DESCRIPTION
A ttk::combobox combines a text field with a pop-down list of values; the user may select the value of the text field from among the values in the list. STANDARD OPTIONS
-class -cursor -takefocus -style See the ttk_widget manual entry for details on the standard options. WIDGET-SPECIFIC OPTIONS Command-Line Name:-exportselection Database Name: exportSelection Database Class: ExportSelection Boolean value. If set, the widget selection is linked to the X selection. Command-Line Name:-justify Database Name: justify Database Class: Justify Specifies how the text is aligned within the widget. Must be one of left, center, or right. Command-Line Name:-height Database Name: height Database Class: Height Specifies the height of the pop-down listbox, in rows. Command-Line Name:-postcommand Database Name: postCommand Database Class: PostCommand A Tcl script to evaluate immediately before displaying the listbox. The -postcommand script may specify the -values to display. Command-Line Name:-state Database Name: state Database Class: State One of normal, readonly, or disabled. In the readonly state, the value may not be edited directly, and the user can only select one of the -values from the dropdown list. In the normal state, the text field is directly editable. In the disabled state, no inter- action is possible. Command-Line Name:-textvariable Database Name: textVariable Database Class: TextVariable Specifies the name of a global variable whose value is linked to the widget value. Whenever the variable changes value the widget value is updated, and vice versa. Command-Line Name:-values Database Name: values Database Class: Values Specifies the list of values to display in the drop-down listbox. Command-Line Name:-width Database Name: width Database Class: Width Specifies an integer value indicating the desired width of the entry window, in average-size characters of the widget's font. WIDGET COMMAND
The following subcommands are possible for combobox widgets: pathName current ?newIndex? If newIndex is supplied, sets the combobox value to the element at position newIndex in the list of -values. Otherwise, returns the index of the current value in the list of -values or -1 if the current value does not appear in the list. pathName get Returns the current value of the combobox. pathName set value Sets the value of the combobox to value. The combobox widget also supports the following ttk::entry widget subcommands (see ttk::entry(3tk) for details): bbox delete icursor index insert selection xview The combobox widget also sup- ports the following generic ttk::widget widget subcommands (see ttk::widget(3tk) for details): cget config- ure identify instate state VIRTUAL EVENTS
The combobox widget generates a <<ComboboxSelected>> virtual event when the user selects an element from the list of values. If the selec- tion action unposts the listbox, this event is delivered after the listbox is unposted. SEE ALSO
ttk::widget(3tk), ttk::entry(3tk) KEYWORDS
choice, entry, list box, text box, widget Tk 8.5 ttk::combobox(3tk)