Simple Code - Sliding Text


DevX Home    Today's Headlines   Articles Archive   Tip Bank   Forums   

Results 1 to 2 of 2

Thread: Simple Code - Sliding Text

  1. #1
    Wayne Warren Guest

    Simple Code - Sliding Text


    I am close to finishing up a ColdFusion/HTML project and thought it would
    be neat to alter some of it so text lines would slide into place when the
    page opens. I have no DHTML experience and, thus, I don't have any DHTML
    books. However, I looked in my HTML book and it gave some code which, I'm
    afraid, falls far short of clearly explaining where code should be placed
    in the program and what it should say. I've gotten text displayed in the
    proper "goal spot" but I cannot get it to actually slide from a starting
    point to the goal. I hope that is understandable.

    If anybody has some simple working code they could just copy and email to
    me so I could look at it and figure out where I've gone wrong, I sure would
    appreciate it. In advance, thanks for taking mercy on me, a true novice.
    Wayne in Dallas

  2. #2
    Steve Cochran Guest

    Re: Simple Code - Sliding Text

    You could do something like this:

    <DIV id=div1 style="POSITION: absolute; VISIBILITY: hidden">Here is some
    text</DIV>
    <SCRIPT language="vbs">
    dim initX
    dim initY
    dim finalX
    dim finalY
    finalX=100
    finalY=100
    sub window_onload()
    initX=1000
    initY=1000
    div1.style.left=initx & "px"
    div1.style.top=inity & "px"
    div1.style.visibility="visible"
    setTimeout "moveit", 200
    end sub
    sub moveit()
    if initx=finalx then exit sub
    initx=initx-10
    inity=inity-10
    div1.style.left=initx & "px"
    div1.style.top=inity & "px"
    setTimeout "moveit",5
    end sub
    </SCRIPT>

    check out the WebWorkshop at

    www.msdn.microsoft.com/workshop


    steve

    "Wayne Warren" <warren777@juno.com> wrote in message
    news:38dd1c17$1@news.devx.com...
    >
    > I am close to finishing up a ColdFusion/HTML project and thought it would
    > be neat to alter some of it so text lines would slide into place when the
    > page opens. I have no DHTML experience and, thus, I don't have any DHTML
    > books. However, I looked in my HTML book and it gave some code which, I'm
    > afraid, falls far short of clearly explaining where code should be placed
    > in the program and what it should say. I've gotten text displayed in the
    > proper "goal spot" but I cannot get it to actually slide from a starting
    > point to the goal. I hope that is understandable.
    >
    > If anybody has some simple working code they could just copy and email to
    > me so I could look at it and figure out where I've gone wrong, I sure

    would
    > appreciate it. In advance, thanks for taking mercy on me, a true novice.
    > Wayne in Dallas



Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
HTML5 Development Center
 
 
FAQ
Latest Articles
Java
.NET
XML
Database
Enterprise
Questions? Contact us.
C++
Web Development
Wireless
Latest Tips
Open Source


   Development Centers

   -- Android Development Center
   -- Cloud Development Project Center
   -- HTML5 Development Center
   -- Windows Mobile Development Center