Preformatted Text

liunx

Guest
Hello,<br />
In the process of building web-based GUI frontends to a backend CICS System, I have to print data streams sent by CICS on a web page using HTML. I am currently using the <PRE> tag in HTML to do this. But there is a lot of unneccesary space included between two rows of such data. <br />
<br />
Does anywone know if there is a way to control the spacing in a <PRE> tag....or even if there are better alternatives to using this tag....???<br />
<br />
Please advice! <br />
<br />
Thanks,<br />
V.<!--content--><pre style="line-height: 50%"><br />
Yesterday, all my troubles seemed so far away <br />
Now it looks as though they're here to stay <br />
Oh I believe in Yesterday. <br />
Suddenly <br />
I'm not half the man I used to be. <br />
There's a shadow hanging over me. <br />
Oh Yesterday came suddenly. <br />
</pre><!--content-->You said "using HTML" so, if that's required, forget this; but you can open a new browser document with a different mime type - like 'plain text'. This will interpret whitespace 'correctly' - but won't give you CSS control as above...just a thought.<br />
<br />
<html><br />
<head><br />
<title>untitled</title><br />
<script type="text/javascript" language="JavaScript"><br />
<br />
var docWin = null;<br />
<br />
function writeToDocWin() {<br />
docWin.document.open('text/plain');<br />
docWin.document.write(<br />
'Yesterday, all my troubles seemed so far away\n',<br />
'Now it looks as though they\'re here to stay\n',<br />
'Oh I believe in Yesterday.\n',<br />
'Suddenly\n',<br />
'I\'m not half the man I used to be.\n',<br />
'There\'s a shadow hanging over me.\n',<br />
'Oh Yesterday came suddenly.'<br />
);<br />
docWin.document.bgColor = '#ddeeff';<br />
docWin.document.close();<br />
}<br />
<br />
function openDocWin() {<br />
docWin=window.open('','docWin','status=0,width=380,height=140,left=200,top=200');<br />
setTimeout('writeToDocWin()',100);<br />
}<br />
<br />
</script><br />
</head><br />
<body><br />
<a href=http://www.htmlforums.com/archive/index.php/"#" onclick="openDocWin();return false;">OPEN DOC WIN</a><br />
</body><br />
</html><!--content-->
 
Back
Top