problem with <pre>

admin

Administrator
Staff member
Hi <br />
I'm having problems with the <pre> tag. I'm using a table<br />
on a html page. The data in the table comes from a database. My problem is that carriage returns won't appear on the html page even when I use the <PRE> tag.<br />
Can anyone help! Thanks<!--content-->Hi sdiack,<br />
<br />
Welcome to the forums. Are you using the <BR> tag to try to create carriage returns? If not, give it a try and let me know if it works.<!--content-->Hi Jason,<br />
Thanks a lot for your response. the carriage returrn is not directly on the html page. It's in an Access database field that is supposed to be a %fieldname% on the html page. That's the reason why I can't use br . Thanks.<!--content-->If your using vbscript or something you can do something like: replace(fieldname,chr(13) & chr(10),"<br>") so it displays it correctly.<br />
<br />
I hope this helps and I'm not way out in left field or something. :)<br />
<br />
SirWeb<!--content-->thanks for your help<br />
I'm using java. What does (fieldname,chr(13) & chr(10),"<br>") do?<br />
Thanks<!--content-->The comand: 'Replace(field,chr(13) & chr(10),"<br>")' <br />
<br />
This takes a string 'field' and finds the eol(chr(13)) and nl(chr(10)) together which is a break and inserts the standard html tag for this instead.<br />
<br />
You may be able to use the javascript mystring.replace() command in the same way.<!--content-->
 
Back
Top