PDA

View Full Version : table cell size changes on dropdown change


buffy
11-20-2002, 12:07 PM
hi

i have a table with javascript charged dropdown boxes (thanks to javascript.com) however when i change box one - the size of the <td> in dropdown 2 gets really tall, and again for no. 3.....

why does this happen??


secondChoice is populated with single ints and thirdChoice is dates - long aas strings....




<td><SELECT ID="ChoiceCentre" NAME="ChoiceCentre" onchange="selectChange(this, FrontPage_Form1.secondChoice, arrItems1, arrItemsGrp1);">
<OPTION VALUE="0" SELECTED>Please select a centre.
<OPTION VALUE="1">1
<OPTION VALUE="2">2
<OPTION VALUE="3">3
<OPTION VALUE="4">4</SELECT></TD> </tr>

<tr><TD>For how many weeks:</td><td><SELECT ID="secondChoice" NAME="secondChoice" onchange="selectChange(this, FrontPage_Form1.thirdChoice, arrItems2, arrItemsGrp2);"><OPTION SELECTED>Duration</SELECT></td></tr>
<tr><td>Starting on:</td><td><SELECT ID="thirdChoice" NAME="thirdChoice"><OPTION SELECTED>Arrival Date</SELECT></TD> </TR>

RadarBob
11-20-2002, 02:03 PM
Can only give general guidance at this point...

Changing the table struture can be tricky. Little things can make the table look like it's 100% screwed up. Be sure no row has more <td>'s than it should and then make sure you're properly terminating every row and every cell.

The widest cell will determine the width for every cell in that column for that table. For other rows that could squish cells against the left page margin or cause funny looking wrapping to the next line visually.

In odd table behavior I've encountered it seems like cellpadding, wrap, etc. have a trickle down effect within a given table, depending on which tag you put the attribute in.

In laying out data entry fields using tables, I've found using multiple tables is necessary to isolate formatting characteristics.