Wrox Home  
Search P2P Archive for: Go

  Return to Index  

asp_databases thread: response.write problem ???


Message #1 by "jon holyoake" <jon.holyoake@m...> on Tue, 23 May 2000 9:55:25
<%dim ors



set ors=server.CreateObject("adodb.recordset")

sql="select * from vacancies"

ors.Open sql, "dsn=jobvacdb"

%>



<table>

<tr>

<td><STRONG>Job Code:</STRONG></td><td><%Response.Write  

ors("jobcode")%></td>

</tr>

</table>





the problem that i am having is due to the amount of text in the " jobcode" 

field.  There is about 3 or 4 lines of text which i need to be displayed in 

the following format



******************************************

******************************************

******************************************



but of course I get 



********************************************************************* 

etc..



one line of text which makes my site width way too big !!!

is there a simple way to make the text drop down to the next line when it 

reaches the end of the page

im a bit new to all this and any help would be greatly appreciated 



Message #2 by Anil Budhkar <anilb@m...> on Tue, 23 May 2000 15:42:09 +0530
You can fix width for <td> tag. 



<table width=75%>

<tr>

<td width=40%><STRONG>Job Code:</STRONG></td>

<td width=50%><%Response.Write ors("jobcode")%></td>

</tr>

</table>



You will get an idea by using this.



Good luck.



Anil.





-----Original Message-----

From: jon holyoake 

Sent: Tuesday, May 23, 2000 3:25 PM

To: ASP Databases

Subject: [asp_databases] response.write problem ???





<%dim ors



set ors=server.CreateObject("adodb.recordset")

sql="select * from vacancies"

ors.Open sql, "dsn=jobvacdb"

%>



<table>

<tr>

<td><STRONG>Job Code:</STRONG></td><td><%Response.Write  

ors("jobcode")%></td>

</tr>

</table>





the problem that i am having is due to the amount of text in the " jobcode" 

field.  There is about 3 or 4 lines of text which i need to be displayed in 

the following format



******************************************

******************************************

******************************************



but of course I get 



********************************************************************* 

etc..



one line of text which makes my site width way too big !!!

is there a simple way to make the text drop down to the next line when it 

reaches the end of the page

im a bit new to all this and any help would be greatly appreciated 





---

Message #3 by Mark Everest <Mark.Everest@t...> on Tue, 23 May 2000 11:03:55 +0100
You could restrict the width of the table by using the width attribute...



<table width="50%">			for half the page





or 



<table width="200">			for an absolute width



The test should then wrap in the cells.



-----Original Message-----

From: jon holyoake 

Sent: 23 May 2000 10:55

To: ASP Databases

Subject: [asp_databases] response.write problem ???





<%dim ors



set ors=server.CreateObject("adodb.recordset")

sql="select * from vacancies"

ors.Open sql, "dsn=jobvacdb"

%>



<table>

<tr>

<td><STRONG>Job Code:</STRONG></td><td><%Response.Write  

ors("jobcode")%></td>

</tr>

</table>





the problem that i am having is due to the amount of text in the " jobcode" 

field.  There is about 3 or 4 lines of text which i need to be displayed in 

the following format



******************************************

******************************************

******************************************



but of course I get 



********************************************************************* 

etc..



one line of text which makes my site width way too big !!!

is there a simple way to make the text drop down to the next line when it 

reaches the end of the page

im a bit new to all this and any help would be greatly appreciated 



Message #4 by "William Milne" <wmilne01@e...> on Tue, 23 May 2000 11:19:39
Jon

If your text is several words i.e. has spaces embedded then try e.g.

<TD width=210 nowrap>. This will force the column to wrap, unless one of 

its words is wider than the specified width.



Willie Milne

On 05/23/00, "jon holyoake" wrote:

> <%dim ors



set ors=server.CreateObject("adodb.recordset")

sql="select * from vacancies"

ors.Open sql, "dsn=jobvacdb"

%>



<table>

<tr>

<td><STRONG>Job Code:</STRONG></td><td><%Response.Write  

ors("jobcode")%></td>

</tr>

</table>





the problem that i am having is due to the amount of text in the " 

jobcode"

field.  There is about 3 or 4 lines of text which i need to be displayed 

in

the following format



******************************************

******************************************

******************************************



but of course I get 



********************************************************************* 

etc..



one line of text which makes my site width way too big !!!

is there a simple way to make the text drop down to the next line when it

reaches the end of the page

im a bit new to all this and any help would be greatly appreciated

Message #5 by "Ken Schaefer" <ken.s@a...> on Tue, 23 May 2000 20:30:45 +1000
<table width="600">    <!-- sets the table width to 600 pixels -->



Cheers

Ken



----- Original Message -----

From: "jon holyoake" 

To: "ASP Databases" <asp_databases@p...>

Sent: Tuesday, May 23, 2000 9:55 AM

Subject: [asp_databases] response.write problem ???





> <%dim ors

>

> set ors=server.CreateObject("adodb.recordset")

> sql="select * from vacancies"

> ors.Open sql, "dsn=jobvacdb"

> %>

>

> <table>

> <tr>

> <td><STRONG>Job Code:</STRONG></td><td><%Response.Write

> ors("jobcode")%></td>

> </tr>

> </table>

>

>

> the problem that i am having is due to the amount of text in the "

jobcode"

> field.  There is about 3 or 4 lines of text which i need to be displayed

in

> the following format

>

> ******************************************

> ******************************************

> ******************************************

>

> but of course I get

>

> *********************************************************************

> etc..

>

> one line of text which makes my site width way too big !!!

> is there a simple way to make the text drop down to the next line when it

> reaches the end of the page

> im a bit new to all this and any help would be greatly appreciated





Message #6 by "Philip.Ware" <Philip.Ware@e...> on Tue, 23 May 2000 11:35:48 +0100
Just need to place the ors("jobcode") into a variable and then use the

VBscript string functions to cut it into 40chars long..



Use a for...next...loop to write out each 40 char length 



for i=0 to len(jobcode) step 40



	line = cut(jobcode)

	response.write line



next i



something like that... ?



Phil.

Message #7 by "William Milne" <wmilne01@e...> on Tue, 23 May 2000 12:6:29
Jon

Sorry, didn't mean to include the nowrap there

Willie

On 05/23/00, "William Milne" wrote:

> Jon

If your text is several words i.e. has spaces embedded then try e.g.

<TD width=210 nowrap>. This will force the column to wrap, unless one of 

its words is wider than the specified width.



Willie Milne

On 05/23/00, "jon holyoake" wrote:

> <%dim ors



set ors=server.CreateObject("adodb.recordset")

sql="select * from vacancies"

ors.Open sql, "dsn=jobvacdb"

%>



<table>

<tr>

<td><STRONG>Job Code:</STRONG></td><td><%Response.Write  

ors("jobcode")%></td>

</tr>

</table>





the problem that i am having is due to the amount of text in the " 

jobcode"

field.  There is about 3 or 4 lines of text which i need to be displayed 

in

the following format



******************************************

******************************************

******************************************



but of course I get 



********************************************************************* 

etc..



one line of text which makes my site width way too big !!!

is there a simple way to make the text drop down to the next line when it

reaches the end of the page

im a bit new to all this and any help would be greatly appreciated

Message #8 by "Robert Larsson" <robert.l@m...> on Wed, 24 May 2000 10:11:45 -0700
It's because in the access db file your "linefeeds" consists of

Chr(13)&Chr(10) instead of "<br>" that HTML understands.



Just write this:



Response.Write(Replace(ors("jobcode"), Chr(13)&Chr(10), "<br>"))





Mvh,

Robert Larsson!

Web-production Coordinator

---------------------------------------------------------------------

Mindflow AB | www.mindflow.se | 08-545 635 10





----- Original Message -----

From: "jon holyoake" 

To: "ASP Databases" <asp_databases@p...>

Sent: Tuesday, May 23, 2000 9:55 AM

Subject: [asp_databases] response.write problem ???





> <%dim ors

>

> set ors=server.CreateObject("adodb.recordset")

> sql="select * from vacancies"

> ors.Open sql, "dsn=jobvacdb"

> %>

>

> <table>

> <tr>

> <td><STRONG>Job Code:</STRONG></td><td><%Response.Write

> ors("jobcode")%></td>

> </tr>

> </table>

>

>

> the problem that i am having is due to the amount of text in the "

jobcode"

> field.  There is about 3 or 4 lines of text which i need to be displayed

in

> the following format

>

> ******************************************

> ******************************************

> ******************************************

>

> but of course I get

>

> *********************************************************************

> etc..

>

> one line of text which makes my site width way too big !!!

> is there a simple way to make the text drop down to the next line when it

> reaches the end of the page

> im a bit new to all this and any help would be greatly appreciated

>


  Return to Index