Here's the 'manual'
http://www.perldoc.com/perl5.6.1/lib/CGI.html

....probably a little easier than trying to read the .pm file.

Print it out and keep it next to your keyboard at all times :)

----------
>From: Tor Hildrum <[EMAIL PROTECTED]>
>To: Perl <[EMAIL PROTECTED]>
>Subject: Re: Might be OT. Making a webpage.
>Date: Sun, Mar 24, 2002, 11:38 pm
>

> On 21/3/02 22:23, "Michael Kelly" <[EMAIL PROTECTED]> wrote:
>> What do you mean? CGI.pm seems to have a function for generating just about
>> every HTML that ever did, does, or will exist. Maybe I'm misunderstanding
>> what you mean by "Perl/CGI webpage"...
>
> I'm pretty sure it does, I'm just having problems finding information about
> what "you get" when using CGI.pm. I recently found out I could read the
> CGI.pm, and it is well documented, so that helps a lot.
>
> Here is an example of the problem I am having:
> I've made this mail.form, it is simply a form that you can use to send me an
> email. I'm using CGI.pm. I can't figure out how to change the
> background-color on the page. This is very trivial, and I'm sure I will find
> it explained once I look in CGI.pm. But, another problem is the size of my
> textfields. I have a textfield for the message, and I want that to be over
> multiple lines, not just one.
>
> Here is my code:
> print p("Your message: ", textfield(-NAME => "message", -VALUE => "", -SIZE
> => $ 250)), hr;
>
> This gives me a long inputfield, but only over 1 line. This is ugly, and bad
> UI, so I want more lines. I couldn't figure out how to do this by reading
> CGI.pm.
>
>>> I have heard writing HTML-code in *.cgi-scripts is considered a no-no, is
>>> there any validity to this?
>>
>> No, it's not. Some people think it's prettier to use CGI.pm, others (like
>> me) prefer total control of their HTML output and just use here-docs.
>
> That is nice to know, as sometimes it easier to use plain HTML-tags, when I
> can't figure out how to do something with CGI.pm.
>
> One last question, some more code:
> my $email = param("email"); # user inputs his email-address.
> ...
> Later in the script:
> chomp($name, $email);
> $email = ($email =~ s/@/\\@/); # escape the @
>
> I inserted these, but I'm not really sure they are needed.
>
> I get the params normally by:
> print p("Your name: ", textfield("name", "name"));
> print p("Your email-address: ", textfield("email",
> "whatever\@whatever.com"));
>
> Could I leave those 2 steps out?
>
> Again, if this is OT I apologize.
> --
> T.
>
>
> --
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
> 

-- 
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to