Alan
10-02-2001, 05:06 AM
Hi there,
Trying like most developers to make my scripts cross-browser, I'm trying
to deal with DHTML in NS6...
I've seen on a web site that if you want to set a "layer's" position through
JavaScript, you should use something like this :
myElement.style.top = "200px" // this value is a string...
So when you want to scroll a layer f.ex., you should assign the position
to a variable (let's say "i"), then increment/decrement it, and then use
something similar to the following syntax :
myElement.style.top = i+"px"
Isn't there a more efficient way to do this, like "myElement.style.moveBy
= 10", or something ? I didn't find anything else.
Thanks for your help !
Alan
Trying like most developers to make my scripts cross-browser, I'm trying
to deal with DHTML in NS6...
I've seen on a web site that if you want to set a "layer's" position through
JavaScript, you should use something like this :
myElement.style.top = "200px" // this value is a string...
So when you want to scroll a layer f.ex., you should assign the position
to a variable (let's say "i"), then increment/decrement it, and then use
something similar to the following syntax :
myElement.style.top = i+"px"
Isn't there a more efficient way to do this, like "myElement.style.moveBy
= 10", or something ? I didn't find anything else.
Thanks for your help !
Alan