CGI/Perl Guide | Learning Center | Forums | Advertise | Login
Site Search: in

  Main Index MAIN
INDEX
Search Posts SEARCH
POSTS
Who's Online WHO'S
ONLINE
Log in LOG
IN

Home: Perl Programming Help: Beginner:
alignment

 



raven
Deleted

Nov 30, 2000, 7:03 AM

Post #1 of 3 (368 views)
alignment Can't Post

I have a simple submit form, I am trying to get the textarea and textfields to align to the left of the input fields, but cant get it to work. Help please.This is a little snippet of the input fields:

print $query->start_form,
$query->center($query->img({src=>'http://csunix.okc.cc.ok.us/~raven/banner1.jpg'})),
$query->p,
"Your name......: ", $query->textfield('name'),
$query->p,
"E-mail address: ", $query->textfield('email'),
$query->p,
"City:................: ", $query->textfield('city'),
$query->p,
"Comments: ", $query->br,
$query->textarea(-name=>'comments', -rows=>8, -columns=>40),
$query->p,


Pasha
Deleted

Jan 7, 2001, 5:26 AM

Post #2 of 3 (363 views)
Re: alignment [In reply to] Can't Post

I think I've solved this problem before. Try this:


open (DATABASE, "./file.txt");
@lines = <DATABASE>;
close DATABASE;
print qq~<form><TEXTAREA name="text" ROWS=10 COLS=70 wrap="OFF">~;
foreach $line (@lines) {
print qq~$line~;
}
print qq~</TEXTAREA></form>~;



Best regards,

Pasha


$500/day for webmasters!


BigRich
Novice

Jan 7, 2001, 10:33 AM

Post #3 of 3 (361 views)
Re: alignment [In reply to] Can't Post

HTML problem, put them in a table.

Also, you don't need the image in the form.



print $query->start_html,

$query->center($query->img({src=>'http://csunix.okc.cc.ok.us/~raven/banner1.jpg'})),

$query->start_form(-action=>'/cgi-bin/myscript.cgi', -method=>'post'),
$query->table({-border=>0,-cellspacing=>5},

$query->Tr({-align=>'left',-valign=>'middle'},
$query->td("Your name: "),
$query->td($query->textfield('name')),
),
$query->Tr({-align=>'left',-valign=>'middle'},
$query->td("E-mail address: "),
$query->td($query->textfield('email')),
),
$query->Tr({-align=>'left',-valign=>'middle'},
$query->td( "City: "),
$query->td($query->textfield('city')),
),
$query->Tr({-align=>'left',-valign=>'middle'},
$query->td("Comments: "),
$query->td($query->textarea(-name=>'comments', -rows=>5, -columns=>35)),
),
$query->Tr({-align=>'left',-valign=>'middle'},
$query->td( $query->submit('Submit')),
$query->td($query->reset()),
),

),

$query->end_form,
$query->end_html;


Don't forget, table rows are Tr not tr otherwise you'll get some hard-to-track errors.


 
 


Search for (options) Powered by Gossamer Forum v.1.2.0

Web Applications & Managed Hosting Powered by Gossamer Threads
Visit our Mailing List Archives