|
-
Apr 9th, 2002, 05:02 PM
#1
Moveing object
Hello there
Well Iam new Javascript...All I want is to move an object in my "web page"...Well.. I can do this using Visual Basic.."object.move x,y"..BUt I want to know How we can do this..using Javascript.....I mean I to move "a picture..a word...or other..on the SCREEN...FROM LEFT TO RIGHT...UP TO DOWN...
Thanks a lot..
-
Apr 10th, 2002, 01:27 AM
#2
The Method I've used is putting it in a <DIV ID="doofus"> tag
then, in javascript you can set
document.all['doofus'].style.top = document.all['doofus'].style.top + 4
(I dunno for Nutscrape)
in a function, and give the function a timeout of say, 100.
for left to right you'd use
.style.left
yadda yadda.
um... hope that helped?????
-
Apr 10th, 2002, 02:03 AM
#3
Fanatic Member
why dont u just use <marquee> ?
-
Apr 10th, 2002, 02:22 AM
#4
-
Apr 10th, 2002, 02:56 AM
#5
Fanatic Member
Hi,
document.all and the <marque> tag only work in Internet Explorer. Use document.getElementByID instead of document.all and take a look here for some cross-browser marques...
http://www.dynamicdrive.com/dynamicindex2/cmarquee.htm - horizontal
and
http://www.dynamicdrive.com/dynamicindex2/cmarquee2.htm - vertical
-
Apr 10th, 2002, 08:58 PM
#6
Fanatic Member
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|