Results 1 to 5 of 5

Thread: ASP Formatting\ HTML Tables

  1. #1

    Thread Starter
    PowerPoster Beacon's Avatar
    Join Date
    Jan 2001
    Location
    Pub Floor
    Posts
    3,188

    ASP Formatting\ HTML Tables

    Hey All,

    I have an online form which users can fill in and change the data in the website.
    When they do they just type until they are done occasionally get the odd enter.

    Now i do have replace statements to pick up on vbcrlf's but when it's displayed it breaks the boundaries of the <table> it's in.
    It doesnt wrap to the table width it goes as wide as it wants.

    Why is this so?
    b

  2. #2
    Fanatic Member davebat's Avatar
    Join Date
    Dec 2002
    Posts
    727
    could you post yout code

  3. #3

    Thread Starter
    PowerPoster Beacon's Avatar
    Join Date
    Jan 2001
    Location
    Pub Floor
    Posts
    3,188
    The piece of the form that plays up:

    Code:
    '---------------------------
    'REPLY
    Response.Write	"<tr>"
    	Response.Write	"<td bgcolor=#DEDFDF valign=top nowrap><font class=drillnav >Description:</font>"
    	Response.Write	"<br><br>"
    	Response.Write	"<table cellpadding=3 cellspacing=1 border=0 bgcolor=#F7F7F7 align=center>"
    
    'REPLY BODY
    Response.Write	"</table></td>"
    	Response.Write	"<td bgcolor=#DEDFDF>"
    		Response.Write	"<table cellpadding=0 cellspacing=0 border=0>"
    		Response.Write	"<tr valign=top>"
    		Dim thebody
    		thebody = replace(rs2.fields("Description")," ", "&nbsp;")
    		thebody = replace(thebody,"vbcrlf","<Br>")
    			Response.Write	"<td class=itemsml><textarea class=drillnav name=MESSAGE rows=20 cols=70 wrap=virtual tabindex=2 value=>" & thebody & "</textarea><br>"
    			Response.Write	"<font class=drillnav ><a href=javascript:checklength(document.vbform);>check message length</a></font></td>"
    		Response.Write	"</tr>"
    		Response.Write	"</table>"
    	Response.Write	"</td>"
    Response.Write	"</tr>"
    Response.Write	"<tr>"
    Here is the display code:

    Code:
    <table width="785" border="0" cellspacing="0" cellpadding="0">
        <td width="335"> &nbsp;</br>
         <table width="280" border="0" cellspacing="0" cellpadding="0" height="418">
         <tr>
         
            <%
      if rs.recordcount <> 0 then
      rs.movefirst
    	do while not rs.eof
             Response.Write " <td valign=top width=40 height=228> <img src=imgs/blue_arrow.gif width=11 height=9 border=0 align=right vspace=15></td>"
             %><a name="<%= rs.fields("ALink") %>" ></a><%
             Response.Write " <td valign=top height=228 width=200> <p align=justify> <img src=" & rs.fields("Image") & " width=235 height=37><br>"
             
             Response.Write "<p class=storytext>"     
             'text here
    					Response.Write replace(rs.fields("Body"),"vbcrlf","<br>")
             Response.Write "</p></td>"
                  
    		Response.Write "</tr>"
            Response.Write "<tr> "
            Response.Write "  <td ></td>"
            Response.Write "  <td> <a href=#top target=mainFrame> <img src=images/top.gif border=0 align=right width=95 height=14></a><br>"
            Response.Write "    <br></td>"
            Response.Write "</tr>"
    	rs.movenext
    	loop
      end if 
            %>
    
          </table></td>

  4. #4
    Frenzied Member Memnoch1207's Avatar
    Join Date
    Feb 2002
    Location
    DUH, Guess...Hint: It's really hot!
    Posts
    1,861
    This is what I get when running your code (I replaced your thebody with a count)
    Being educated does not make you intelligent.

    Need a weekend getaway??? Come Visit

  5. #5
    Frenzied Member andreys's Avatar
    Join Date
    Sep 2002
    Location
    Los Angeles
    Posts
    1,615
    I'm not exactly sure how iot should look like, but all of your table tags messed up. Normal table structure is:
    Code:
    <table>   
        <tr>
            <td>    
            </td>
        </tr>
    </table>

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