I have a page, all items are hidden. The idea was to let the onformload
event trigger the page transformation.
Ive written teh following code that should case 1 letter to scroll
across the screen till it hits the leftedge of its area then another
character follows across and so and so on.
ive tested teh code in vb6 and it works great. yet on teh page all i get
is the company name appearing.
any ideas?
Option Explicit
dim Outpos
dim InPos
dim InString
dim InLen
dim wrkString
dim LastPos
sub Load_Main_Header_Line
inlen = 0
lastpos = 0
outpos = 0
Instring = "Company Name Here"
inlen = len(trim(instring))
wrkstring=space(inlen)
mainheader.style.visibility="visible"
mainheader.align="left"
mainheader.style.fontFamily ="impact"
mainheader.style.fontSize ="36pt"
mainheader.style.fontWeight ="bold"
lastpos = 1
outpos = inlen
inpos = 1
for inpos = 1 to inlen step 1
Get_A_Character
next
mainheader.innerText = trim(instring)
mainheader.align="center"
end sub
sub Get_A_Character
dim onechar
onechar = mid(instring, inpos, 1)
if onechar <> space(1) then
outpos = inlen
for outpos = inlen to lastpos step -1
Slide_It_Left
next
End if
lastpos = lastpos + 1
end sub
Sub Slide_It_Left
dim onechar
dim outString
dim tmpstring
dim oldpos
outstring = space(inlen)
onechar = mid(instring, inpos, 1)
tmpstring = wrkstring
'<-- space out last position
oldpos = outpos + 1
if outpos > 0 then
if oldpos <= inlen then
wrkstring = left(tmpstring,outpos) _
& onechar _
& space(inlen - (oldpos - 1))
else
wrkstring = left(tmpstring, (outpos - 1)) _
& onechar _
& space(inlen - (outpos - 1))
end if
mainheader.innerText = wrkstring
settimeout "WaitNull", 99999999
end if
end sub
sub WaitNull
end sub
I would really appreciate any ideas on this its driving me nuts.
sincerely
Woody
any sugestion or comment made by me should be examined first for
validity and appropriateness before assuming i have any idea at all
what the heck i am talking about. I am not responsible for anything you
may see with my name attached to it, i think.
*** Sent via Developersdex http://www.developersdex.com ***
Don't just participate in USENET...get rewarded for it!