Results 1 to 6 of 6

Thread: Moveing object

  1. #1
    gencoglu
    Guest

    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..

  2. #2
    I'm about to be a PowerPoster! mendhak's Avatar
    Join Date
    Feb 2002
    Location
    Ulaan Baator GooGoo: Frog
    Posts
    38,170
    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?????

  3. #3
    Fanatic Member ubunreal69's Avatar
    Join Date
    Apr 2001
    Location
    Morayfield, Australia
    Posts
    609
    why dont u just use <marquee> ?

  4. #4
    I'm about to be a PowerPoster! mendhak's Avatar
    Join Date
    Feb 2002
    Location
    Ulaan Baator GooGoo: Frog
    Posts
    38,170
    Originally posted by ubunreal69
    why dont u just use <marquee> ?


    oh yeah!! and it can go vertical too!

  5. #5
    Fanatic Member punkpie_uk's Avatar
    Join Date
    Sep 2001
    Location
    UK
    Posts
    645
    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
    SPREAD THE WORD!!! Are You Lee McCormick? Because I Am



    Lee M McCormick
    [email protected]

    Lee McCormick.com - Live
    Dynamically Webbed.com - In development but live

  6. #6
    Fanatic Member ubunreal69's Avatar
    Join Date
    Apr 2001
    Location
    Morayfield, Australia
    Posts
    609
    Originally posted by mendhak

    oh yeah!! and it can go vertical too!
    for the vertical bit i hate javascript, mainly cos i dont know it, even though I'd like to.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  



Click Here to Expand Forum to Full Width