Forums
This topic is locked
help me please, thank's
Posted 23 Jan 2003 09:00:06
1
has voted
23 Jan 2003 09:00:06 genuine kau posted:
i'm facing problem when try to make a news page using dreamweaver (ASPVBScript), please help, check this page: www32.brinkster.com/faithmedia/News.htm < this web is just a preview of preview page in my server
I've a submit page and preview page, in the submit page i've the text area where u can put ur news in and the preview page, the problem is after i put my text in the textarea in submit page (i've already put a wrap function) it can wrap but after i press submit button. In the preview page the text doesn't wrap and the text go straight unless u press an enter so the question is how do i need to do in order to make it automaticall wrap my text in my preview page any idea?because if the user forgot to press enter to the next line , it'll straight go one line and the table become longger so please help me thank's
if u need my e-mail :
thank's
i'm using dreamweaverMX and ASPVBScript
Replies
Replied 23 Jan 2003 09:22:59
23 Jan 2003 09:22:59 Owen Eastwick replied:
If cant wrap if there are no spaces in the character string, for example:
XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX
Enter something more realistic and you should find it's OK.
Regards
Owen.
---------------------------------------------------
Used programming books and web development software for sale (UK only):
www.tdsf.co.uk/Shop.htm
Multiple Parameter UD4 / Access 2000 Search Tutorial:
www.tdsf.co.uk/tdsfdemo/
XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX
Enter something more realistic and you should find it's OK.
Regards
Owen.
---------------------------------------------------
Used programming books and web development software for sale (UK only):
www.tdsf.co.uk/Shop.htm
Multiple Parameter UD4 / Access 2000 Search Tutorial:
www.tdsf.co.uk/tdsfdemo/
Replied 25 Jan 2003 23:25:23
25 Jan 2003 23:25:23 Jørgen Emerslund replied:
I would try to create a function, say ThatsAWrap() which went something like (string being what you want to wrap):
<pre id=code><font face=courier size=2 id=code>
function ThatsAWrap(string)
dim iMaxLineLength
dim strStringStash ' A way to temporarly store the new string
dim i ' A "buffer" variable
iMaxLineLength = 30 ' Maximum number of characters in one line
i = 1
Do Until Len(string) <= iMaxLineLength
strStringStash = strStringStash & Mid(string, i * iMaxLineLength, 30) & "<br />"
i = i +1
Loop
end function </font id=code></pre id=code>
This would probably wrap the text as you'de like it. If you want to keep the text intact as it is in the database, you just run it when you display the text from the DB. Take note that this routine chops up everything in it's way, no matter what, meaning that if you use it at a sentence, most likley you would chop any word in two. I suggest reading up on the split-function and arrays if you want to use my approach. That way you could run this routine at the induvidual words.
<pre id=code><font face=courier size=2 id=code>
function ThatsAWrap(string)
dim iMaxLineLength
dim strStringStash ' A way to temporarly store the new string
dim i ' A "buffer" variable
iMaxLineLength = 30 ' Maximum number of characters in one line
i = 1
Do Until Len(string) <= iMaxLineLength
strStringStash = strStringStash & Mid(string, i * iMaxLineLength, 30) & "<br />"
i = i +1
Loop
end function </font id=code></pre id=code>
This would probably wrap the text as you'de like it. If you want to keep the text intact as it is in the database, you just run it when you display the text from the DB. Take note that this routine chops up everything in it's way, no matter what, meaning that if you use it at a sentence, most likley you would chop any word in two. I suggest reading up on the split-function and arrays if you want to use my approach. That way you could run this routine at the induvidual words.