Results 1 to 3 of 3

Thread: Easy HTML

  1. #1

    Thread Starter
    Fanatic Member
    Join Date
    Jun 2000
    Location
    N.Ireland
    Posts
    651
    Im wanting to put a combo boxes within a table but dont know how....can anyone help?!ie. Where do i put the <Table><TR><TD> tags????

    Heres my combo box code (which works!)::

    g_objSC.Response.Write "<select name=select>" & vbCrLf
    Do While Not rs.EOF
    g_objSC.Response.Write "<option value=" & rs(0) & ">" & rs(1) & "</option>" & vbCrLf
    rs.MoveNext

    Loop
    g_objSC.Response.Write "</select></BR>" & vbCrLf


    Gilly

  2. #2
    Frenzied Member Mark Sreeves's Avatar
    Join Date
    Nov 1999
    Location
    UK
    Posts
    1,845
    Code:
    <!-- this is a 2X2  table with your select in the top left cell-->
    <TABLE> <!--Starts a table -->
    	<TR><!--Starts a Row -->
    		<TD> <!--Starts a cell -->	
    			<%
    			Response.Write "<select name=select>" & vbCrLf 
    				Do While Not rs.EOF 
    					Response.Write "<option value=" & rs(0) & ">" & rs(1) & "</option>" & vbCrLf 
    					rs.MoveNext 
    
    				Loop 
    				Response.Write "</select></BR>" & vbCrLf 
    			%>
    		
    		
    		
    		</TD><!-- closes a cell ->
    
    		<TD> <!--Starts a cell -->	
    		
    		</TD><!-- closes a cell ->
    		
    	</TR><!-- ends a row-->
    	
    	<TR><!--Starts a Row -->
    		<TD> <!--Starts a cell -->	
    		
    		</TD><!-- closes a cell ->
    
    		<TD> <!--Starts a cell -->	
    		
    		</TD><!-- closes a cell ->
    		
    	</TR>
    </TABLE> <!--ends a table -->
    Mark
    -------------------

  3. #3
    Addicted Member S@NSIS's Avatar
    Join Date
    Aug 2000
    Location
    Stoke-On-Trent, England
    Posts
    243
    Hi,
    Try:

    <TABLE width="100" height="100" border="1">
    <TR>
    <TD width="100" height="100">
    g_objSC.Response.Write "<select name=select>" & vbCrLf
    Do While Not rs.EOF
    g_objSC.Response.Write "<option value=" & rs(0) & ">" & rs(1) & "</option>" & vbCrLf
    rs.MoveNext

    Loop
    g_objSC.Response.Write "</select></BR>" & vbCrLf
    </TD>
    </TR>
    </TABLE>

    You will need to change the height and width of the table to suit your needs

    Hope this helps

    Shaun
    Web/Application Developer
    VB6 Ent (SP5), Win 2000,SQL Server 2000

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  



Click Here to Expand Forum to Full Width