LinuxQuestions.org
Register a domain and help support LQ
Go Back   LinuxQuestions.org > Forums > Non-*NIX Forums > Programming
User Name
Password
Programming This forum is for all programming questions.
The question does not have to be directly related to Linux and any language is fair game.

Notices

Reply
 
Search this Thread
Old 10-30-2003, 09:20 PM   #1
matt_w_lambert
Member
 
Registered: Jan 2003
Location: WA
Distribution: Red Hat 9.0, mandrake 9.2
Posts: 194

Rep: Reputation: 30
an html form question


i was wanderin if sombody new how to make a form that had a big textbox with a small textbox under it and when you type in the small textbox and hit submit
your text will be displayed in the big text box and it stays there for others to view and it is read only

sorry for the poor explanation it is hard for me to discribe
 
Old 10-30-2003, 09:48 PM   #2
SaTaN
Member
 
Registered: Aug 2003
Location: Suprisingly in Heaven
Posts: 223

Rep: Reputation: 32
Code:
#!/usr/perl
use CGI qw/:standard/;
if($_GET['small_text'])
{
        $smalltext=$_GET['small_text']
        print " <html>\n
                <title>Big Text Display </tilte>\n
                <form name=text action=index.cgi method=get>\n
                This is the text box :: $smalltext;
                <input type=textbox name=name size=20 value=small_txt>\n
                <input type=submit value=submit>\n</html>";
}
else
{
         print " <html>\n
                <title>Big Text Display </tilte>\n
                <form name=text action=index.cgi method=get>\n
                This is the text box :: STILL NOT ENTERED ANYTHING ;
                <input type=textbox name=name size=20>\n
                <input type=submit value=submit>\n</html>";
}
I don't think using a big textbox is required for making the text readonly . It would be better if you just print it . That is what I have done

I also don't have a machine right now with me so please excuse me if there are any typos / anything
 
Old 10-30-2003, 10:48 PM   #3
matt_w_lambert
Member
 
Registered: Jan 2003
Location: WA
Distribution: Red Hat 9.0, mandrake 9.2
Posts: 194

Original Poster
Rep: Reputation: 30
how would i embed that into a html page ? i havent used perl much and its been a long time
 
Old 10-30-2003, 11:41 PM   #4
SaTaN
Member
 
Registered: Aug 2003
Location: Suprisingly in Heaven
Posts: 223

Rep: Reputation: 32
That is html page that I am generating . The output of this script is in html

You should use either cgi or php to do what you asked for

I do them in perl

<edit>See it is like this you are taking input and generating an another html page
in which the text in the small text box is printed in big text box.
So, the text will be a variable
This second html page is being generated dynamically . So, some program should be run on the server so that the html page can be generated .
For that I use either cgi or php and I do them in perl
I think you can even do them in C also
</edit>

Last edited by SaTaN; 10-30-2003 at 11:46 PM.
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Html Form File Cottsay General 0 11-05-2005 01:30 PM
capture html form data blizunt7 Programming 12 06-19-2005 08:31 PM
html question: form henrikanttonen Programming 4 08-13-2004 07:28 AM
Contact form on HTML Gerardoj Linux - General 1 03-26-2004 02:08 AM
problem with html form meluser Linux - Software 4 03-15-2003 12:28 PM


All times are GMT -5. The time now is 02:57 AM.

Main Menu
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
identi.ca: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration