Hello and welcome to our community! Is this your first visit?
Register
Enjoy an ad free experience by logging in. Not a member yet? Register.
Results 1 to 5 of 5
  1. #1
    New Coder
    Join Date
    Oct 2005
    Posts
    10
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Question Adding Description To Posted JavaScript Slideshow

    I am just learning JavaScript so I need some help or just to know if this is possible.

    On this site is an awesome JavaScript for a onMouseover slideshow. I got it to work beautifully

    onMouseover Slideshow Link

    Here's what I'd like to do. When The mouse goes over the link it displays the photo in column two. I'd like to put in a third column, (that is easy enuff ) and in that third column would be a description of the photo.

    Is this possible?

    If so any clue how to best go about it. I've tried a couple of different things but I am lost here at how to best approach it

    Thanks

  • #2
    Senior Coder
    Join Date
    Apr 2005
    Posts
    1,051
    Thanks
    0
    Thanked 0 Times in 0 Posts
    where you want the text to appear put this:

    <span id='mnu_text'></span>

    when you want to change the text in it you use .innerHTML

    like so..

    var e = document.getElementById('mnu_text');
    e.innerHTML = "this is the new text";

    then, onMouseOut you simply

    var e = document.getElementById('mnu_text');
    e.innerHTML = "";
    public string ConjunctionJunction(string words, string phrases, string clauses)
    {
    return (String)(words + phrases + clauses);
    }
    <--- Was I Helpfull? Let me know ---<

  • #3
    New Coder
    Join Date
    Oct 2005
    Posts
    10
    Thanks
    0
    Thanked 0 Times in 0 Posts
    Thanks for the response

    Still not getting it. It probably is a little advanced for me

    Is there a way you could use the script to let see an example? Or another way?

    Sorry for being a pain.. Off to the library to get a javascript book

  • #4
    Senior Coder
    Join Date
    Apr 2005
    Posts
    1,051
    Thanks
    0
    Thanked 0 Times in 0 Posts
    <html>
    <head>
    <script>

    function toggleDesc(text){
    var e = document.getElementById('DescriptionText');
    e.innerHTML = text;
    }

    function resetDesc(){
    var e = document.getElementById('DescriptionText');
    e.innerHTML = '';
    }

    </script>
    </head>
    <body>
    <a href="#" onMouseOver="toggleDesc('this is the new description')" onMouseOut="resetDesc()">this is a link</a>
    <br /><br />
    <span id="DescriptionText"></span>
    </body></html>
    public string ConjunctionJunction(string words, string phrases, string clauses)
    {
    return (String)(words + phrases + clauses);
    }
    <--- Was I Helpfull? Let me know ---<

  • #5
    New Coder
    Join Date
    Oct 2005
    Posts
    10
    Thanks
    0
    Thanked 0 Times in 0 Posts
    Quote Originally Posted by rlemon
    <html>
    <head>
    <script>

    function toggleDesc(text){
    var e = document.getElementById('DescriptionText');
    e.innerHTML = text;
    }

    function resetDesc(){
    var e = document.getElementById('DescriptionText');
    e.innerHTML = '';
    }

    </script>
    </head>
    <body>
    <a href="#" onMouseOver="toggleDesc('this is the new description')" onMouseOut="resetDesc()">this is a link</a>
    <br /><br />
    <span id="DescriptionText"></span>
    </body></html>

    Works out great. Thanks for the help guys. Sorry for the delay in the thanks



  •  

    Posting Permissions

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