I hope someone can help me with this. I trying to convert some VBscript to JavaScript so that a webpage will be cross browser viewable.
I think I have most of this figured out. But in the code below that I marked in red is what I don't understand. Could someone help convert this to javascript or maybe tell me what the varibale "data" would containg?
Here is the code for a sub that I'm trying to convert:
data=data&"<IMG src='"&document.all("bkg"&i).src&"'>"
next
document.all("box"&i).insertAdjacentHTML "BeforeEnd", data
I think I have most of this figured out. But in the code below that I marked in red is what I don't understand. Could someone help convert this to javascript or maybe tell me what the varibale "data" would containg?
Here is the code for a sub that I'm trying to convert:
Code:
REM Initialize
sub setUp()
REM Get window dimensions
wW=w.clientWidth
wH=w.offsetHeight
sH=w.scrollHeight
REM Set the scroll Height
bH=wH
if sH>wH then bH=sH
for i=1 to borders
y(i)=-(pH(i))
REM Set margins
w.style.marginLeft=pW(1)
w.style.marginRight=pW(2)
chkPics(i)=numPics(i)
REM Adjust number of pics for message length
if int(bH/pH(i))>numPics(i) then
chkPics(i)=int(bH/pH(i))+3
data=""
for j=numPics(i)+1 to chkPics(i)
data=data&"<IMG src='"&document.all("bkg"&i).src&"'>"
next
document.all("box"&i).insertAdjacentHTML "BeforeEnd", data
Code:
end if
REM Limit visible area
document.all("container"&i).style.width=pW(i)
document.all("container"&i).style.height=bH
if i=1 then
document.all("container"&i).style.left=0
else
document.all("container"&i).style.left=wW-pW(i)
end if
document.all("container"&i).style.top=0
REM Set the size of the scrolling area
document.all("box"&i).style.height=bH+3*pH(i)
document.all("box"&i).style.width=pW(i)
document.all("box"&i).style.left=0
document.all("box"&i).style.top=y(i)
next
if calcFlag=1 then
calcFlag=0
setUp
end if
REM Start the scroll.
SF
end sub