I have a question regarding the CGI module. I'd rather use the CGI functions to put all of my HTML together, But In this one case I can't figure out how to do it the way I want to. Take the following sample.
print table(
Tr(
[
td(['First Name:', textfield(-name=>"first_name", -maxle
+ngth=>25, -size=>12),
'Last Name:' , textfield(-name=>"last_name", -maxl
+ength=>25, -size=>12)
]),
td({ -colspan=>2 },['Address:' , textarea(-name=>"addres
+s",
-rows=>10,
-columns=>50)]),
]
)
);
This creates a table with two rows. The fist row has four columns for two textboxes and two labels. I want the second row to have one column with a colspan of one and one column with a colspan of three. The docs don't specify a way to distribute atrributes among a group of td elements. I know how to give each td in the row a colspan of 2 as above, but how do I give two different colspans to the td elements? Is it possible when using the Tr([]) shortcut?
-
Are you posting in the right place? Check out Where do I post X? to know for sure.
-
Posts may use any of the Perl Monks Approved HTML tags. Currently these include the following:
<code> <a> <b> <big>
<blockquote> <br /> <dd>
<dl> <dt> <em> <font>
<h1> <h2> <h3> <h4>
<h5> <h6> <hr /> <i>
<li> <nbsp> <ol> <p>
<small> <strike> <strong>
<sub> <sup> <table>
<td> <th> <tr> <tt>
<u> <ul>
-
Snippets of code should be wrapped in
<code> tags not
<pre> tags. In fact, <pre>
tags should generally be avoided. If they must
be used, extreme care should be
taken to ensure that their contents do not
have long lines (<70 chars), in order to prevent
horizontal scrolling (and possible janitor
intervention).
-
Want more info? How to link
or How to display code and escape characters
are good places to start.