• Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 208
  • Last Modified:

Tables - how can I put things NEXT to it

I have a table
<TABLE -stuff here>
  <TR>
     <TD>item1</TD>
     <TD>item2</TD>
  </TR>
  <TR>
     <TD>item3</TD>
     <TD>item4</TD>
  </TR>
</TABLE>

would produce something like
item1 item2
item3 item4

well I would like to put a button next to the table

item1 item2 (button)
item3 item4 (button2)

I've searched through the entire MSDN library and can not find any attribute to allow me to do this =(  unless I missed it.

Please clue me in as to how =)

~Ixeus
0
The_Brain
Asked:
The_Brain
1 Solution
 
andreifCommented:
add more cells:

<TABLE>
 <TR>
    <TD>item1</TD>
    <TD>item2</TD>
    <TD>button1</TD>
 </TR>
 <TR>
    <TD>item3</TD>
    <TD>item4</TD>
    <TD>button2</TD>
 </TR>
</TABLE>


to display button you can use form:

<form>
<input type=button value="Caption here">
</form>
0
 
hongjunCommented:
You can create another column or it

<TABLE -stuff here>
 <TR>
    <TD>item1</TD>
    <TD>item2</TD>
    <TD><input type="button" value="Button 1"></TD>
 </TR>
 <TR>
    <TD>item3</TD>
    <TD>item4</TD>
    <TD><input type="button" value="Button 2"></TD>
 </TR>
</TABLE>


Or

You can use white spaces to do it
<TABLE -stuff here>
 <TR>
    <TD>item1</TD>
    <TD>item2&nbsp;<input type="button" value="Button 1"></TD>
 </TR>
 <TR>
    <TD>item3</TD>
    <TD>item4&nbsp;<input type="button" value="Button 2"></TD>
 </TR>
</TABLE>


I would recommend the first method.


hongjun
0
 
The_BrainAuthor Commented:
ok sorry, but I got a border on my table

so it's actually

|--------------
|item1 | item2 | [button]
|item3 | item4 | [button2]
---------------

Sorry @.@

I already tried those solutions before :(

~Ixeus
0
What does it mean to be "Always On"?

Is your cloud always on? With an Always On cloud you won't have to worry about downtime for maintenance or software application code updates, ensuring that your bottom line isn't affected.

 
a.marshCommented:
The most obvious choice I can see in this case is to use nested tables e.g.:

<TABLE BORDER="0">
<TR><TD><TABLE BORDER="1">
 <TR>
    <TD>item1</TD>
    <TD>item2</TD>
 </TR>
 <TR>
    <TD>item3</TD>
    <TD>item4</TD>
 </TR>
</TABLE></TD>
<TD><TABLE BORDER="0">
 <TR>
    <TD>[button]</TD>
 </TR>
 <TR>
    <TD>[button]</TD>
 </TR>
</TABLE></TD>
</TR>
</TABLE>

That's just one way of nesting them - you may have to do it differently or adjust cellspacing and cellpadding on each table in order to ensure everything looks lined up - but that will really depend on the data you have in the table.

What you may also need to do to ensure that each row is the same height is to use a transparent gif to force the browser to set a particular height - don't try using the height attribute in the table itself if you need this to work in Netscape!


:o)

Ant
0
 
The_BrainAuthor Commented:
You are the man :)

I thought that might be the solution... but dang it's so ugly...  but looks SO complex @.@ mmmmmmmmmmmmm could impress my boss maybe *grin*

You should see this table you want me to embed... I just used a pretty pathetic example X_X

~Ixeus

thx again... I'll accept your answer once I get this to work :)

(in mean time, here's what I'm trying to merge)



<FORM NAME="QUERYFORM" METHOD="POST" ACTION="SaveEdit.asp">
            <FONT FACE="ARIAL" SIZE="5">
                  <!--<B>VIEW LOGS</B>-->
                  <IMG src="Headings/ViewEdit.gif">
                  <INPUT TYPE="BUTTON" NAME="FIRSTRECORD" VALUE = "<<"
                  <%
                        if (BlurPrevious=true) then
                              response.write " disabled"
                        end if
                  %>></INPUT>
                  <INPUT TYPE="BUTTON" NAME="PREVIOUSRECORD" VALUE = "<-"
                  <%
                        if (BlurPrevious=true) then
                              response.write " disabled"
                        end if
                  %>></INPUT>
                  <INPUT TYPE="BUTTON" NAME="NEXTRECORD" VALUE = "->"
                  <%
                        if (BlurNext=true) then
                              response.write " disabled"
                        end if
                  %>></INPUT>
                  <INPUT TYPE="BUTTON" NAME="LASTRECORD" VALUE = ">>"
                  <%
                        if (BlurNext=true) then
                              response.write " disabled"
                        end if
                  %>></INPUT><BR>
                  <INPUT TYPE="BUTTON" NAME="EDITDATA" VALUE = "Edit data"></INPUT>
                  <INPUT TYPE="SUBMIT" NAME="SAVECHANGES" VALUE = "Save changes" disabled></INPUT>
                  <INPUT TYPE="RESET" NAME="CANCELCHANGES" VALUE = "Cancel changes" disabled></INPUT>                  
                  <FONT Size="3">Record <%=AvailableMoves(2)%> of <%=AvailableMoves(3)+1%></FONT>
                  
                  <TABLE BORDER="7" CELLPADDING="5" WIDTH="60%" HEIGHT="10%" NOWRAP COLS="3" CLEAR="RIGHT" BORDERCOLOR="DARKBLUE" RULES="NONE" title="Query" bordercolordark="Blue">
                        <!-- (Row) 1-->
                        <TR>
                              <TD WIDTH = "33%">
                                    <B><FONT SIZE="-1">Call #</FONT></B><BR>
                                    <INPUT NAME="CALLNUMBER" TYPE="TEXT" SIZE="4"  disabled VALUE="<%=Server.HTMLEncode(rs("CallNumber") &"")%>"></INPUT>
                              </TD>
                              <TD>
                                    <B><FONT SIZE="-1">Client/Project</FONT></B><BR>
                                    <SELECT NAME="CLIENTORPROJECT" disabled>
                                          <%
                                                rsCP.open "SELECT * FROM T_ClientOrProject WHERE ClientOrProject IS NOT NULL"
                                          %>
                                          <OPTION VALUE="<%=Server.HTMLEncode(rs("ClientOrProject") &"")%>"><%LookUpClientOrProject(Server.HTMLEncode(rs("ClientOrProject") &""))%></OPTION>
                                          <%
                                                
                                                rsCP.MoveFirst                                                
                                                do while not rsCP.EOF
                                          %>
                                                            <OPTION VALUE="<%=Server.HTMLEncode(rsCP("ClientOrProjectID") &"")%>">                              
                                                            <%=Server.HTMLEncode(rsCP("ClientOrProject") &"")%>
                                                            </OPTION>      
                                          <%                  
                                                rsCP.MoveNext
                                                loop
                                                rsCP.close
                                          %>                                    
                                    </SELECT>
                              </TD>
                              <TD>
                                    <B><FONT SIZE="-1">Priority</FONT></B><BR>
                                    <SELECT NAME="PRIORITY" disabled>
                                          <OPTION VALUE="<%=Server.HTMLEncode(rs("Priority") &"")%>"><%=Server.HTMLEncode(rs("Priority") &"")%></OPTION>
                                          <OPTION VALUE="1">High</OPTION>
                                          <OPTION VALUE="2">Medium</OPTION>
                                          <OPTION VALUE="3">Low</OPTION>
                                    </SELECT>
                              </TD>
                        </TR>
                        <!-- (Row) 2-->
                        <TR>
                              <TD>
                                    <B><FONT SIZE="-1">Log date</FONT></B><BR>
                                    <INPUT NAME="LOGDATE" TYPE="TEXT" SIZE="11" disabled VALUE="<%=Server.HTMLEncode(rs("InitCallLogDate") &"")%>">
                              </TD>
                              <TD>
                                    <B><FONT SIZE="-1">Log time</FONT></B><BR>
                                    <INPUT NAME="LOGTIME" TYPE="TEXT" SIZE="8" disabled VALUE="<%=Server.HTMLEncode(rs("InitCallLogTime") &"")%>"></INPUT>
                              </TD>
                              <TD>
                                    <B><FONT SIZE="-1">Call logger</FONT></B><BR>
                                    <SELECT NAME="CALLLOGGER" disabled>
                                          <OPTION VALUE="<%=Server.HTMLEncode(rs("CallLogger") &"")%>"><%=Server.HTMLEncode(rs("CallLogger") &"")%></OPTION>
                                          <%
                                                rsEC.open "SELECT * FROM T_EmployeeCharacter"
                                                do while not rsEC.EOF
                                          %>
                                                      <OPTION VALUE="<%=Server.HTMLEncode(rsEC("Name") &"")%>">
                                                      <%=Server.HTMLEncode(rsEC("Name") &"")%>
                                                      </OPTION>
                                          <%
                                                rsEC.MoveNext
                                                loop
                                                rsEC.MoveFirst
                                                'To be used again for the Last Call logger
                                          %>                                    
                                          
                                    </SELECT>
                              </TD>
                        </TR>
                        <!-- (Row) 3-->
                        <TR>      
                              <TD COLSPAN="3">
                                    <B><FONT SIZE="-1">Short decription</FONT></B><BR>
                                    <INPUT NAME="SHORTDESCRIPTION" TYPE="TEXT" SIZE="45" disabled VALUE="<%=Server.HTMLEncode(rs("ShortDescription") &"")%>"></INPUT>
                              </TD>
                        </TR>
                        <!-- (Row) 4-->
                        <TR>
                              <TD>
                                    <B><FONT SIZE="-1">Deadline date</FONT></B><BR>
                                    <INPUT NAME="DEADLINEDATE" TYPE="TEXT" SIZE="11" disabled VALUE="<%=Server.HTMLEncode(rs("DeadlineDate") &"")%>"></INPUT>
                              </TD>
                              <TD>
                                    <B><FONT SIZE="-1">Status</FONT></B><BR>
                                    <SELECT NAME="STATUS" disabled>
                                          <OPTION VALUE="<%=Server.HTMLEncode(rs("CurrentStatus") &"")%>"><%=Server.HTMLEncode(rs("CurrentStatus") &"")%></OPTION>
                                          <%
                                                rsST.open "SELECT * FROM T_Status"
                                                do while not rsST.EOF
                                          
                                          %>
                                                <OPTION VALUE="<%=Server.HTMLEncode(rsST("Status") &"")%>">
                                                <%=Server.HTMLEncode(rsST("Status") &"")%>
                                                </OPTION>
                                          <%
                                                rsST.MoveNext
                                                loop
                                                rsST.close
                                          %>      
                                          
                                    </SELECT>
                              </TD>
                              <TD>
                              </TD>
                        </TR>
                        <!-- (Row) 5-->
                        <TR>      
                              <TD>
                                    <B><FONT SIZE="-1">Last status change date</FONT></B><BR>
                                    <INPUT NAME="DATESTATUSCHANGED" TYPE="TEXT" SIZE="11" disabled VALUE="<%=Server.HTMLEncode(rs("DateStatusChanged") &"")%>"></INPUT>
                              </TD>
                              <TD>
                                    <B><FONT SIZE="-1">Last status changer</FONT></B><BR>
                                    <SELECT NAME="LASTSTATUSCHANGER" disabled>
                                          <OPTION VALUE="<%=Server.HTMLEncode(rs("LastStatusChanger") &"")%>"><%=Server.HTMLEncode(rs("LastStatusChanger") &"")%></OPTION>
                                          <%
                                                do while not rsEC.EOF
                                          %>
                                                <OPTION VALUE="<%=Server.HTMLEncode(rsEC("Name") &"")%>">
                                                      <%=Server.HTMLEncode(rsEC("Name") &"")%>
                                                </OPTION>
                                          <%
                                                rsEC.MoveNext
                                                loop
                                                rsEC.MoveFirst
                                                'use again for next one
                                          %>
                                          
                                    </SELECT>
                              </TD>
                              <TD>
                              </TD>
                        </TR>
                        <!-- (Row) 6-->
                        <TR>
                              <TD>
                                    <B><FONT SIZE="-1">Assigned to</FONT></B><BR>
                                    <SELECT NAME="ASSIGNEDTO" disabled>
                                          <OPTION VALUE="<%=Server.HTMLEncode(rs("AssignedTo") &"")%>"><%=Server.HTMLEncode(rs("AssignedTo") &"")%></OPTION>
                                          <%
                                                do while not rsEC.EOF
                                          %>
                                                <OPTION VALUE="<%=Server.HTMLEncode(rsEC("Name") &"")%>">
                                                      <%=Server.HTMLEncode(rsEC("Name") &"")%>
                                                </OPTION>
                                          <%
                                                rsEC.MoveNext
                                                loop
                                                rsEC.close
                                                'no use anymore on this page
                                          %>
                                    </SELECT>
                              </TD>
                              <TD>
                                    <B><FONT SIZE="-1">Workload</FONT></B><BR>
                                    <INPUT NAME="WORKLOAD" TYPE="TEXT" SIZE="4" disabled VALUE="<%=Server.HTMLEncode(rs("WorkLoad") &"")%>"></INPUT>
                              </TD>
                              <TD>
                              </TD>
                        </TR>
                        <!-- (Row) 7-->            
                        <TR>
                              <TD>
                                    <B><FONT SIZE="-1">Required skill</FONT></B><BR>
                                    <SELECT NAME="REQUIREDSKILL" disabled>
                                          <OPTION VALUE="<%=Server.HTMLEncode(rs("RequiredSkill") &"")%>"><%=Server.HTMLEncode(rs("RequiredSkill") &"")%></OPTION>
                                          <%
                                                rsRS.open "SELECT * FROM T_RequiredSkills"
                                                do while not rsRS.EOF
                                          %>
                                                <OPTION VALUE="<%=Server.HTMLEncode(rsRS("RequiredSkill") &"")%>">
                                                      <%=Server.HTMLEncode(rsRS("RequiredSkill") &"")%>
                                                </OPTION>
                                          <%
                                                rsRS.MoveNext
                                                loop
                                                rsRS.close
                                                'no use anymore on this page
                                          %>
                                    </SELECT>
                              </TD>
                              <TD>
                                    <B><FONT SIZE="-1">Required skill level</FONT></B><BR>
                                    <INPUT NAME="REQUIREDSKILLLEVEL" TYPE="TEXT" SIZE="4" disabled VALUE="<%=Server.HTMLEncode(rs("RequiredSkillLevel") &"")%>"></INPUT>
                              </TD>
                              <TD>
                                    <B><FONT SIZE="-1">Time spent</FONT></B><BR>
                                    <INPUT NAME="TIMESPENT" TYPE="TEXT" SIZE="4" disabled VALUE="<%=Server.HTMLEncode(rs("TimeSpent") &"")%>"></INPUT>h
                              </TD>
                        </TR>
                        <!-- (Row) 8-->
                        <TR>
                              <TD COLSPAN = "3">
                                    <B><FONT SIZE="-1">Detail</FONT></B><BR>
                                    <TEXTAREA NAME="DETAIL" ROWS="5" COLS="55" disabled><%=Server.HTMLEncode(rs("DetailedDescription") &"")%></TEXTAREA>
                              </TD>
                        </TR>      
                  </TABLE>
                  
                  <%
                        rs.Close
                  %>
                  </FONT>
            </FORM>
0
 
The_BrainAuthor Commented:
Very nice =)
I LOVE this table nesting... god why did I use it in the first place!

It totally rules ;)

I can align it no problems, some basic tecniques to use when you apply table and it's contents.

~Ixeus

Thanks again for your help, if you have MSN messenger look me up under Ixeus@hotmail.com :)


0
 
a.marshCommented:
Glad to have helped.

Thanks for the A!

:o)

Ant
0

Featured Post

Free Tool: Site Down Detector

Helpful to verify reports of your own downtime, or to double check a downed website you are trying to access.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

Tackle projects and never again get stuck behind a technical roadblock.
Join Now