Html Long Word Wrap.
Welcome, Guest. Please login or register. Did you miss your activation email?


Pages: [1]
  Print  
Author Topic: Html Long Word Wrap.  (Read 220 times)
Metroidn1f
Jr. Member
**
Posts: 51



View Profile
« on: April 25, 2010, 02:04:27 PM »

Hey, I was wondering if anyone knows how to word wrap a very long line, and make sure that it still stays in the window source margin?

Here is an example of what is happening.
I am going to use this 77777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777
                                             as the long line.
The _ is the margin.

   _77777777777777777777777777777777777777777777777777_77
  _77777777777777777777777777777777777777777777777777_
  _77777

The first line is going over the margin, and the rest of the lines are staying in the margin.  Using a bigger window does not help.  I don't want to make it bigger, because the number can be as big as what the answer is to 9999**9999.

So what I want it to do is, go to a new line once it reaches the end of the margin.  So like this.

   _77777777777777777777777777777777777777777777777777_
  _77777777777777777777777777777777777777777777777777_
  _7777777

If you need picture, I can upload a picture of what it is doing, but not what I want it to do because I can't do it.

Here is my code:

Code:
<Title>Log of installation</Title>
<HTA:APPLICATION ID="Log"
SCROLL="Yes"
SCROLLFLAT="No"
SingleInstance="Yes"
ShowInTaskbar="Yes"
SysMenu="Yes"
MaximizeButton="No"
MinimizeButton="No"
Border="Thin"
BORDERSTYLE="Complex"
INNERBORDER="No"
Caption="Yes"
WindowState="Normal"
APPLICATIONNAME="MainApp"
Icon="%SystemRoot%\winhlp32.exe">
<STYLE type="text/css">

BODY
{
Font-Size:8.25pt;
Font-Weight:Bold;
Font-Family:Lucida Console;
Color:#FFFFFF;
BackGround-Color:#000000;
Margin-Top:8;
Margin-Bottom:8;
Margin-Left:8;
Margin-Right:8;
Padding-Top:0;
Padding-Bottom:0;
Padding-Left:0;
Padding-Right:0;
Text-Align:Left;
Vertical-Align:Top;
}

</STYLE>
<script Language='VBSCRIPT'>
'-> Resize And Move Window
Dim Wth :Wth = int(800)
Dim Hht :Hht = int(200)
window.ResizeTo Wth, Hht
MoveTo ((Screen.Width / 2) - (Wth / 1)),((Screen.Height / 1.1) - (Hht / 1))
'-> Text Display Varible
Dim F1 :F1 = "<FONT STYLE='Font:8.25pt;Color:#FFFFFF;Font-Weight:Bold;'>"





</SCRIPT>
<BODY Scroll='Yes'>



<SCRIPT LANGUAGE="VBScript">


function getdata()

Set objFSO = CreateObject("Scripting.FileSystemObject")
Set objTextFile = objFSO.OpenTextFile ("Answer.txt")
Do Until objTextFile.AtEndOfStream
getdata = objTextFile.Readline & "<br>"
Loop

end function



document.write "<SPAN style='word-wrap:break-word;' id='upd'>" & getdata() & "</SPAN>"


</script>

</BODY>

And for the Answer.txt, just make a text file that is really long with no spaces, and name it, Answer.txt, and put it in the directory that the hta is in.
Logged

I might only be 16, but I am really smart with computers!
Pages: [1]
  Print  
 
Jump to: