DevX Home    Today's Headlines   Articles Archive   Tip Bank   Forums   

+ Reply to Thread
Results 1 to 4 of 4

Thread: Text Swapping

  1. #1
    Mark Guest

    Text Swapping


    Hi, I want to get an effect similar to a java rollover but I don't want to
    use images. I want the text in a particular area of my page to swap as I
    point over a link or button:

    choice 1

    choice 2

    choice 3 the text over here swaps depending on which
    choice the mouse is over.
    choice 4

    can this be done?

  2. #2
    Ashiq PM Guest

    Re: Text Swapping


    "Mark" <mataylor1@prodigy.net> wrote:
    >
    >Hi, I want to get an effect similar to a java rollover but I don't want

    to
    >use images. I want the text in a particular area of my page to swap as

    I
    >point over a link or button:
    >
    >choice 1
    >
    >choice 2
    >
    >choice 3 the text over here swaps depending on which
    > choice the mouse is over.
    >choice 4
    >
    >can this be done?


    Please try this.

    <html>

    <script language='JavaScript'>
    function fun(str)
    {
    s.innerText=str;
    }

    </script>

    <body>
    move mouse over to the buttons<br>
    <form name="f">
    <input type=button name="b1" value="Button1"
    onmouseover="fun('my first button')"></input><br><br>
    <input type=button name="b2" value="Button2"
    onmouseover="fun('and this, my second button')"></input><br><br>
    <input type=button name="b3" value="Button3"
    onmouseover="fun('button 3 is pointed to')"></input><br><br>
    <input type=button name="b4" value="Button4"
    onmouseover="fun('mouse is over the fourth button')"></input>

    </form>
    <div style="position:absolute;top=60px;left=200px;border-style:double;
    width=280;text-align:center;background-color:cornsilk;color:darkgreen;font-weight:bold;
    border-color:darkblue;height:70;">
    <br><span id="s">text swap demo</span>
    </div>
    </body>
    </html>



  3. #3
    octavio Guest

    Re: Text Swapping



    Go to www.dynamicdrive.com they have exactly what you need under a link
    section "buttons and links".... something like that... they got tons of stuff.
    Free


  4. #4
    Ken Guest

    Re: Text Swapping


    Try this link, I believe it will do what you are asking for

    http://www.dynamicdrive.com/dynamicindex5/linkinfo.htm


    "octavio" <octavio@hotmail.com> wrote:
    >
    >
    >Go to www.dynamicdrive.com they have exactly what you need under a link
    >section "buttons and links".... something like that... they got tons of

    stuff.
    >Free
    >



Bookmarks

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


Top DevX Stories

Easy Web Services with SQL Server 2005 HTTP Endpoints
JavaOne 2005: Java Platform Roadmap Focuses on Ease of Development, Sun Focuses on the "Free" in F.O.S.S.
Wed Yourself to UML with the Power of Associations
Microsoft to Add AJAX Capabilities to ASP.NET
IBM's Cloudscape Versus MySQL


Sponsored Links