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
QComboTableItem(3qt)													      QComboTableItem(3qt)

NAME
QComboTableItem - Means of using comboboxes in QTables SYNOPSIS
#include <qtable.h> Inherits QTableItem. Public Members QComboTableItem ( QTable * table, const QStringList & list, bool editable = FALSE ) ~QComboTableItem () virtual void setCurrentItem ( int i ) virtual void setCurrentItem ( const QString & s ) int currentItem () const QString currentText () const int count () const QString text ( int i ) const virtual void setEditable ( bool b ) bool isEditable () const virtual void setStringList ( const QStringList & l ) virtual int rtti () const DESCRIPTION
The QComboTableItem class provides a means of using comboboxes in QTables. A QComboTableItem is a table item which looks and behaves like a combobox. The advantage of using QComboTableItems rather than real comboboxes is that a QComboTableItem uses far less resources than real comboboxes in QTables. When the cell has the focus it displays a real combobox which the user can interact with. When the cell does not have the focus the cell looks like a combobox. Only text items (i.e. no pixmaps) may be used in QComboTableItems. QComboTableItem items have the edit type WhenCurrent (see EditType). The QComboTableItem's list of items is provided by a QStringList passed to the constructor. The list of items may be changed using setStringList(). The current item can be set with setCurrentItem() and retrieved with currentItem(). The text of the current item can be obtained with currentText(), and the text of a particular item can be retrieved with text(). If isEditable() is TRUE the QComboTableItem will permit the user to either choose an existing list item, or create a new list item by entering their own text; otherwise the user may only choose one of the existing list items. To populate a table cell with a QComboTableItem use QTable::setItem(). QComboTableItems may be deleted with QTable::clearCell(). QComboTableItems can be distinguished from QTableItems and QCheckTableItems using their Run Time Type Identification number (see rtti()). <center> [Image Omitted] </center> See also QCheckTableItem, QTableItem, QComboBox, and Advanced Widgets. MEMBER FUNCTION DOCUMENTATION
QComboTableItem::QComboTableItem ( QTable * table, const QStringList & list, bool editable = FALSE ) Creates a combo table item for the table table. The combobox's list of items is passed in the list argument. If editable is TRUE the user may type in new list items; if editable is FALSE the user may only select from the list of items provided. By default QComboTableItems cannot be replaced by other table items since isReplaceable() returns FALSE by default. See also QTable::clearCell() and EditType. QComboTableItem::~QComboTableItem () QComboTableItem destructor. int QComboTableItem::count () const Returns the total number of list items in the combo table item. int QComboTableItem::currentItem () const Returns the index of the combo table item's current list item. See also setCurrentItem(). QString QComboTableItem::currentText () const Returns the text of the combo table item's current list item. See also currentItem() and text(). bool QComboTableItem::isEditable () const Returns TRUE if the user can add their own list items to the combobox's list of items; otherwise returns FALSE. See also setEditable(). int QComboTableItem::rtti () const [virtual] Returns 1. Make your derived classes return their own values for rtti()to distinguish between different table item subclasses. You should use values greater than 1000, preferably a large random number, to allow for extensions to this class. See also QTableItem::rtti(). Reimplemented from QTableItem. void QComboTableItem::setCurrentItem ( int i ) [virtual] Sets the list item i to be the combo table item's current list item. See also currentItem(). Example: table/small-table-demo/main.cpp. void QComboTableItem::setCurrentItem ( const QString & s ) [virtual] This is an overloaded member function, provided for convenience. It behaves essentially like the above function. Sets the list item whose text is s to be the combo table item's current list item. Does nothing if no list item has the text s. See also currentItem(). void QComboTableItem::setEditable ( bool b ) [virtual] If b is TRUE the combo table item can be edited, i.e. the user may enter a new text item themselves. If b is FALSE the user may may only choose one of the existing items. See also isEditable(). void QComboTableItem::setStringList ( const QStringList & l ) [virtual] Sets the list items of this QComboTableItem to the strings in the string list l. QString QComboTableItem::text ( int i ) const Returns the text of the combo's list item at index i. See also currentText(). SEE ALSO
http://doc.trolltech.com/qcombotableitem.html http://www.trolltech.com/faq/tech.html COPYRIGHT
Copyright 1992-2007 Trolltech ASA, http://www.trolltech.com. See the license file included in the distribution for a complete license statement. AUTHOR
Generated automatically from the source code. BUGS
If you find a bug in Qt, please report it as described in http://doc.trolltech.com/bughowto.html. Good bug reports help us to help you. Thank you. The definitive Qt documentation is provided in HTML format; it is located at $QTDIR/doc/html and can be read using Qt Assistant or with a web browser. This man page is provided as a convenience for those users who prefer man pages, although this format is not officially supported by Trolltech. If you find errors in this manual page, please report them to qt-bugs@trolltech.com. Please include the name of the manual page (qcombotableitem.3qt) and the Qt version (3.3.8). Trolltech AS 2 February 2007 QComboTableItem(3qt)