Good day
The function below is supposed to take a string EG 'LAND CMD'. My intention is to simply loop through each caracter and place a '<br>' between them. If a space is found place a ' <bR>'
Therefore the output should be:
L
A
N
D
C
M
D
However the output seems to be:
LAND CMDL
A
N
D
C
M
D
I am having trouble identifying why its out putting the whole string in the first iteration, then behaves as it should. It is cut and paste code that runs error free, some assistance would be appreciated.
<%
function vertText(theText)
dim strCount
strCount = 1
on error resume next
vertText = CSTr(trim(theText))
for strCount = strCount to len(vertText)
if mid(vertText,strCount,1) = " " then
vertText = vertText & mid(vertText,strCount,1) & " <bR>"
else
vertText = vertText & mid(vertText,strCount,1) & "<bR>"
end if
next
end function
response.write vertText("LAND CMD")
%>
TYIA
BTW: This relates to a post in the CSS area where I was tring to achieve vertical text using CSS. Not without assistance, we managed to acieve the objective however the printer(s) didnt like it. Therefore I find myself trying to achieve my objective using ASP.
For those who are interested in the client side solution where a printer prevented me from reaching my objective the post may be seen at
http://p2p.wrox.com/topic.asp?TOPIC_...02&whichpage=2
Wind is your friend
Matt