c p c
07-03-2003, 07:52 AM
Hi,
I am having a problem trying to contain the size of a table cell when i add text to my database records.
When the text is retrieved back into the asp page the text just goes in a straight line instead of fitting into the specified widths of the table and having line breaks..
This is driving me nuts.
I know this is more of a html problem but when i made the page originally in HTML format I dont jave this problem, only in ASP.
The problem occurs in the <% content %> section
any solutions?
cheers
code below
<!--content section-->
<TD VALIGN="top">
<TABLE CELLPADDING=0 CELLSPACING=0 BORDER=0>
<TR>
<TD><IMG SRC="images/trans.gif" BORDER=0 WIDTH=57 HEIGHT=1></TD>
<TD WIDTH=550>
<TABLE WIDTH=550 CELLPADDING=0 CELLSPACING=0 BORDER=0>
<TR>
<TD HEIGHT=60 VALIGN="top"><IMG SRC="images/recruit.gif"></TD>
</TR>
<TR>
<TD CLASS="title" HEIGHT=40 VALIGN="top">Current Vacancies</TD>
</TR>
<%
Set myConnection = Server.CreateObject("ADODB.Connection")
myConnection.Open "DRIVER=Microsoft Access Driver (*.mdb);DBQ=" &Server.MapPath("motorworld.mdb") & ";user=;PASSWORD="
sqlquery = "SELECT * FROM table_jobs;"
Set rsJobs = myConnection.Execute(sqlquery)
count=0
Do While Not rsJobs.EOF
%>
<TR>
<TD CLASS="title2" HEIGHT=25 VALIGN="top"><%= rsJobs("title") %></TD>
</TR>
<TR>
<TD CLASS="date" HEIGHT=22 VALIGN="top">Date Job Added:  <%= rsJobs("date") %></TD>
</TR>
<TR>
<TD CLASS="content"><%= rsJobs("content") %></TD>
</TR>
<TR>
<TD><BR><FONT FACE="Verdana,Arial,Helvetica" SIZE=-2 COLOR=#FF0000><a Href="editjobs.asp?ID=<%= rsJobs("ID") %>"><B>edit this job</B></a> | <a Href="delete.asp?ID=<%= rsJobs("ID") %>"><B>delete this job</B></a></TD>
</TR>
<TR>
<TD ALIGN="center" HEIGHT=50><IMG SRC="images/jobgap.gif" WIDTH=400 HEIGHT=2 BORDER=0></TD>
</TR>
<%
rsJobs.moveNext
count=count+1
Loop
Set rsJobs = Nothing
myConnection.Close
Set myConnection = Nothing
%>
<TR>
<TD ALIGN="center" VALIGN="bottom" HEIGHT=50><IMG SRC="images/bot_logos.gif" WIDTH=364 HEIGHT=29 BORDER=0></TD>
</TR>
</TABLE>
</TD>
<TD><IMG SRC="images/trans.gif" BORDER=0 WIDTH=50 HEIGHT=1></TD>
</TR>
</TABLE>
</TD>
<!--end of content-->
I am having a problem trying to contain the size of a table cell when i add text to my database records.
When the text is retrieved back into the asp page the text just goes in a straight line instead of fitting into the specified widths of the table and having line breaks..
This is driving me nuts.
I know this is more of a html problem but when i made the page originally in HTML format I dont jave this problem, only in ASP.
The problem occurs in the <% content %> section
any solutions?
cheers
code below
<!--content section-->
<TD VALIGN="top">
<TABLE CELLPADDING=0 CELLSPACING=0 BORDER=0>
<TR>
<TD><IMG SRC="images/trans.gif" BORDER=0 WIDTH=57 HEIGHT=1></TD>
<TD WIDTH=550>
<TABLE WIDTH=550 CELLPADDING=0 CELLSPACING=0 BORDER=0>
<TR>
<TD HEIGHT=60 VALIGN="top"><IMG SRC="images/recruit.gif"></TD>
</TR>
<TR>
<TD CLASS="title" HEIGHT=40 VALIGN="top">Current Vacancies</TD>
</TR>
<%
Set myConnection = Server.CreateObject("ADODB.Connection")
myConnection.Open "DRIVER=Microsoft Access Driver (*.mdb);DBQ=" &Server.MapPath("motorworld.mdb") & ";user=;PASSWORD="
sqlquery = "SELECT * FROM table_jobs;"
Set rsJobs = myConnection.Execute(sqlquery)
count=0
Do While Not rsJobs.EOF
%>
<TR>
<TD CLASS="title2" HEIGHT=25 VALIGN="top"><%= rsJobs("title") %></TD>
</TR>
<TR>
<TD CLASS="date" HEIGHT=22 VALIGN="top">Date Job Added:  <%= rsJobs("date") %></TD>
</TR>
<TR>
<TD CLASS="content"><%= rsJobs("content") %></TD>
</TR>
<TR>
<TD><BR><FONT FACE="Verdana,Arial,Helvetica" SIZE=-2 COLOR=#FF0000><a Href="editjobs.asp?ID=<%= rsJobs("ID") %>"><B>edit this job</B></a> | <a Href="delete.asp?ID=<%= rsJobs("ID") %>"><B>delete this job</B></a></TD>
</TR>
<TR>
<TD ALIGN="center" HEIGHT=50><IMG SRC="images/jobgap.gif" WIDTH=400 HEIGHT=2 BORDER=0></TD>
</TR>
<%
rsJobs.moveNext
count=count+1
Loop
Set rsJobs = Nothing
myConnection.Close
Set myConnection = Nothing
%>
<TR>
<TD ALIGN="center" VALIGN="bottom" HEIGHT=50><IMG SRC="images/bot_logos.gif" WIDTH=364 HEIGHT=29 BORDER=0></TD>
</TR>
</TABLE>
</TD>
<TD><IMG SRC="images/trans.gif" BORDER=0 WIDTH=50 HEIGHT=1></TD>
</TR>
</TABLE>
</TD>
<!--end of content-->