Results 1 to 4 of 4

Thread: Help!

  1. #1
    recreate Guest

    Default Help!

    Hi,<BR><BR>I am having a problem with implementing a <BR> command within the code below:<BR><BR>&#060;font face=&#039;Verdana, Arial, Helvetica&#039; color=&#039;#FFCC33&#039; size=2&#062;" & "" & grs.Fields("ArticleData") & "&#060;/font&#062;.<BR><BR>This code represents the data collected from a textarea box. I wish to break the line after a certain number of words, so that it does not roll of the screen causing a vertical scroll rather than a horizontal scroll.<BR><BR>many thanks in advance.<BR><BR>create to recreate.

  2. #2
    New ASP Guest

    Default RE: Help!

    &#060;%@ Language=VBScript %&#062;<BR>&#060;%<BR><BR>var = "abcdefghijabcdefghijABC"<BR><BR>k = 10 &#039;&#060;- INSERT <BR> EVERY 10 CHAR<BR>i = 1<BR>FLAG = TRUE<BR><BR>WHILE FLAG<BR><BR>IF k &#062;= LEN(var) THEN<BR><BR> mys = var & "<BR>"<BR> FLAG = FALSE<BR><BR>ELSE<BR><BR> temp = mid(var, i, k) & "<BR>"<BR> mys = mys & temp<BR> i = i+ k<BR> IF i+k &#062;= LEN(var) THEN<BR> k = len(var) - i<BR> temp = mid(var, i, k+1) & "<BR>"<BR> mys = mys & temp<BR> FLAG = FALSE<BR> END IF<BR>END IF<BR>WEND<BR><BR>Response.Write mys<BR>%&#062;<BR>

  3. #3
    New ASP Guest

    Default I am sure this is NOT the best way but..

    BUT it works.<BR><BR>Put the code into a function, then you can call the function when you need...<BR><BR>Good luck!!

  4. #4
    Join Date
    Dec 1969

    Default It *should* happen automatically.

    If you are just putting the text into an HTML area of the window, the text should automatically be "folded" to fit the width of the screen, with no horizontal scrolling needed.<BR><BR>You must be putting something *else* there that is causing the text to go "too wide." Maybe show more code?<BR><BR>

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts