any solution to prevent too long string text for guest book for example: some one type in hooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooo It is even better if you can give real example case or site. I like to give you good rep if you have good solution.
what did you want to make with this too long string??? for EX: hoooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooo after code hooooooooooooooooooooooo oooooooooooooooooooooooo oooooooooooooooooooooooo oooooooooooooooooooooooo oooooooooooooooooooooooo
yes can be that way any "creative way" will be fine if you have any new idea will be even better...... Thanks
<% Function StringC(StringText,LongN) on error resume next dim TXTC TXTC=left(StringText,LongN-1) & "<BR>" for MU=1 to int(len(StringText)/LongN) TXTC=TXTC & mid(StringText,MU*LongN,LongN) & "<BR>" Next StringC=TXTC End Function Response.write StringC("HOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOO",20) %> Code (markup): if you have any problem with code i'm ready to help you
I got result: HOOOOOOOOOOOOOOOOOO OOOOOOOOOOOOOOOOOOOO OOOOOOOOOOOOOOOOOOOO OOOOOOOOOOOOOOOOOOOO OOOOOOOOOOOOOOOOOOOO OO thanks for contributing the code It is one of nice one. the long string has been forced to be cut in every length 20 why TXTC=left(StringText,LongN-1) why not TXTC=left(StringText,LongN-0) A good rep for Techno_EG from me It will be even better if you can make sure not to cut a word into to parts.
very simple, use javascript or if you are using .net give validation controll you can give condition in the controll
isnt it simple to put the output into a div ? the div Propertie NOWRAP - Sets or retrieves whether the browser automatically performs wordwrap. so, if you dont define the NOWRAP Propertie in the div tag, it will auto wrap it. <div id="Output" width="100px"><%=OutputSTR%></div> Code (markup): this code should result a 100 pixels wide div, which will auto wrap the content. gl.